(self["webpackChunkwebpackJsonp_FAVE_"] = self["webpackChunkwebpackJsonp_FAVE_"] || []).push([["topplayer"],{ /***/ "74757619dd33318de31c": /***/ (function(module, exports, __webpack_require__) { /* module decorator */ module = __webpack_require__.nmd(module); /*! For license information please see player.js.LICENSE.txt */ !function(e,t){ true?module.exports=t():0}(this,(()=>(()=>{var __webpack_modules__={74240:function(e,t,n){var r,i,o,a,s=n(23716);o=this,a=function(){var e={};return function(){"use strict";var t,n,r,i,o,a,u,c,l,d,_,f,h,p,g,v,m,y,b,S,E,$,T,A,C,P,I,w,M,k,O,R,D,L,x,N,U,B,F,j,H,V,W,q,G,Y,K,z,X,Q,J,Z,ee,te,ne,re,ie,oe,ae,se,ue,ce,le={};function de(){var e,t="";for("-"===n&&a(t="-");n>="0"&&n<="9";)t+=n,a();if("."===n)for(t+=".";a()&&n>="0"&&n<="9";)t+=n;if("e"===n||"E"===n)for(t+=n,a(),"-"!==n&&"+"!==n||(t+=n,a());n>="0"&&n<="9";)t+=n,a();if(e=+t,!isNaN(e))return e;o("Bad number")}function _e(e){return e<10?"0"+e:e}function fe(e){return R.lastIndex=0,R.test(e)?'"'+e.replace(R,(function(e){var t=x[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}d=e.Constants={version:"4.7.5",CUSTOMER_KEY:"customerKey",GATEWAY_URL:"gatewayUrl",LOG_LEVEL:"logLevel",ASSET_NAME:"Conviva.assetName",PLAYER_NAME:"Conviva.applicationName",APPLICATION_VERSION:"c3.app.version",IS_LIVE:"Conviva.streamType",ENCODED_FRAMERATE:"Conviva.encodedFrameRate",DEFAULT_RESOURCE:"Conviva.defaultResource",STREAM_URL:"Conviva.streamUrl",VIEWER_ID:"Conviva.viewerId",DURATION:"Conviva.duration",UTM_TRACKING_URL:"c3.cm.utmTrackingUrl",POD_INDEX:"podIndex",POD_POSITION:"podPosition",POD_DURATION:"podDuration",AD_TYPE:"adType",MODULE_NAME:"Conviva.moduleName",MODULE_VERSION:"Conviva.moduleVersion",FRAMEWORK_NAME:"Conviva.frameworkName",FRAMEWORK_VERSION:"Conviva.frameworkVersion",i:"Constants not yet configured",o:"Invalid : Did you report playback ended?",u:"Invalid : Did you report ad playback ended?",h:"Player cannot be null",l:"PlaybackAnlytics already built",v:"PlaybackAnlytics not yet built",Playback:{BITRATE:"BITRATE",AVG_BITRATE:"AVG_BITRATE",PLAY_HEAD_TIME:"PLAY_HEAD_TIME",RESOLUTION:"RESOLUTION",BUFFER_LENGTH:"BUFFER_LENGTH",PLAYER_STATE:"PLAYER_STATE",RENDERED_FRAMERATE:"RENDERED_FRAMERATE",SEEK_STARTED:"SEEK_STARTED",SEEK_ENDED:"SEEK_ENDED",CDN_IP:"CDN_IP",DROPPED_FRAMES_TOTAL:"DROPPED_FRAMES_TOTAL",DROPPED_FRAMES_COUNT:"DROPPED_FRAMES_COUNT",AUDIO_LANGUAGE:"AUDIO_LANGUAGE",SUBTITLES_LANGUAGE:"SUBTITLES_LANGUAGE",CLOSED_CAPTIONS_LANGUAGE:"CLOSED_CAPTIONS_LANGUAGE"},Network:{SIGNAL_STRENGTH:"SIGNAL_STRENGTH",LINK_ENCRYPTION:"LINK_ENCRYPTION",CONNECTION_TYPE:"CONNECTION_TYPE"},ErrorSeverity:{FATAL:1,WARNING:0},NO_SESSION_KEY:-2,AdPosition:{PREROLL:"Pre-roll",MIDROLL:"Mid-roll",POSTROLL:"Post-roll"},AdPlayer:{CONTENT:"CONTENT",SEPARATE:"SEPARATE"},DeviceType:{DESKTOP:"DESKTOP",CONSOLE:"Console",SETTOP:"Settop",MOBILE:"Mobile",TABLET:"Tablet",SMARTTV:"SmartTV"},AdType:{CLIENT_SIDE:"Client Side",SERVER_SIDE:"Server Side"},AdSlates:{BLACKOUT_SLATE:"Blackout slate",TECHNICAL_DIFFICULTIES_SLATE:"Technical Difficulties slate",COMMERCIAL_SLATE:"Commercial Break slate",OTHER_SLATE:"Other slate",VPAID:"VPAID",REGULAR:"Regular Ad"},AdServingType:{INLINE:"Inline",WRAPPER:"Wrapper"},DeviceCategory:{ANDROID_DEVICE:"AND",APPLE_DEVICE:"APL",CHROMECAST:"CHR",DESKTOP_APP:"DSKAPP",DEVICE_SIMULATOR:"SIMULATOR",LG_TV:"LGTV",NINTENDO:"NINTENDO",PLAYSTATION:"PS",ROKU:"RK",SAMSUNG_TV:"SAMSUNGTV",SMART_TV:"TV",SET_TOP_BOX:"STB",TIVO:"TIVO",WEB:"WEB",WINDOWS_DEVICE:"WIN",XBOX:"XB",KAIOS_DEVICE:"KAIOS"},LogLevel:{DEBUG:0,INFO:1,WARNING:2,ERROR:3,NONE:4},PlayerState:{STOPPED:"STOPPED",PLAYING:"PLAYING",BUFFERING:"BUFFERING",PAUSED:"PAUSED",UNKNOWN:"UNKNOWN",NOT_MONITORED:"NOT_MONITORED"},Events:{USER_WAIT_STARTED:"Conviva.UserWaitStarted",USER_WAIT_ENDED:"Conviva.UserWaitEnded",BUMPER_VIDEO_STARTED:"Conviva.BumperVideoStarted",BUMPER_VIDEO_ENDED:"Conviva.BumperVideoEnded",AD_REQUESTED:"Conviva.AdRequested",AD_RESPONSE:"Conviva.AdResponse",AD_SLOT_STARTED:"Conviva.SlotStarted",AD_ATTEMPTED:"Conviva.AdAttempted",AD_SLOT_ENDED:"Conviva.SlotEnded",AD_IMPRESSION_START:"Conviva.AdImpression",AD_START:"Conviva.AdStart",AD_FIRST_QUARTILE:"Conviva.AdFirstQuartile",AD_MID_QUARTILE:"Conviva.AdMidQuartile",AD_THIRD_QUARTILE:"Conviva.AdThirdQuartile",AD_COMPLETE:"Conviva.AdComplete",AD_END:"Conviva.AdEnd",AD_IMPRESSION_END:"Conviva.AdImpressionEnd",AD_SKIPPED:"Conviva.AdSkipped",AD_ERROR:"Conviva.AdError",AD_PROGRESS:"Conviva.AdProgress",AD_CLOSE:"Conviva.AdClose",CONTENT_PAUSED:"Conviva.PauseContent",CONTENT_RESUMED:"Conviva.ResumeContent",POD_START:"Conviva.PodStart",POD_END:"Conviva.PodEnd"},ErrorType:{ERROR_UNKNOWN:"ERROR_UNKNOWN",ERROR_IO:"ERROR_IO",ERROR_TIMEOUT:"ERROR_TIMEOUT",ERROR_NULL_ASSET:"ERROR_NULL_ASSET",ERROR_MISSING_PARAMETER:"ERROR_MISSING_PARAMETER",ERROR_NO_AD_AVAILABLE:"ERROR_NO_AD_AVAILABLE",ERROR_PARSE:"ERROR_PARSE",ERROR_INVALID_VALUE:"ERROR_INVALID_VALUE",ERROR_INVALID_SLOT:"ERROR_INVALID_SLOT",ERROR_3P_COMPONENT:"ERROR_3P_COMPONENT",ERROR_UNSUPPORTED_3P_FEATURE:"ERROR_UNSUPPORTED_3P_FEATURE",ERROR_DEVICE_LIMIT:"ERROR_DEVICE_LIMIT",ERROR_UNMATCHED_SLOT_SIZE:"ERROR_UNMATCHED_SLOT_SIZE"},StreamType:{UNKNOWN:"UNKNOWN",LIVE:"LIVE",VOD:"VOD"},CallbackFunctions:{CONSOLE_LOG:"consoleLog",MAKE_REQUEST:"makeRequest",SAVE_DATA:"saveData",LOAD_DATA:"loadData",GET_EPOCH_TIME_IN_MS:"getEpochTimeInMs",CREATE_TIMER:"createTimer",GENERATE_HASH:"generateHash",BASE64_ENCODE:"base64Encode"},DeviceMetadata:{BRAND:"DeviceBrand",MANUFACTURER:"DeviceManufacturer",MODEL:"DeviceModel",TYPE:"DeviceType",VERSION:"DeviceVersion",OS_NAME:"OperatingSystemName",OS_VERSION:"OperatingSystemVersion",CATEGORY:"DeviceCategory",SCREEN_RESOLUTION_WIDTH:"ScreenWidth",SCREEN_RESOLUTION_HEIGHT:"ScreenHeight",SCREEN_RESOLUTION_SCALE_FACTOR:"ScaleFactor"},AD_PRELOAD_FEATURE:"adPreloading",AD_TAG_URL:"adTagUrl",IMASDK_CONTENT_PLAYER:"imaMainContentPlayer",CONVIVA_AD_MODULE:"convivaAdModule",CONVIVA_MODULE:"convivaModule",MEDIA_ELEMENT:"mediaElement",APP_TRACKER_EVENT:{TYPE:"convivaVideoEvent",INIT:"c3.sdk.init",VIDEO_ATTEMPT:"c3.video.attempt",VIDEO_END:"c3.video.end",VIDEO_PLAY:"c3.video.play",VIDEO_PAUSE:"c3.video.pause",VIDEO_BUFFERING:"c3.video.buffering",VIDEO_ERROR:"c3.video.error",SDK_CUSTOM_EVENT:"c3.sdk.custom_event",VIDEO_CUSTOM_EVENT:"c3.video.custom_event",AD_BREAK_START:"c3.ad.ad_break_start",AD_BREAK_END:"c3.ad.ad_break_end",VIDEO_METADATA_CHANGE:"c3.video.set_content_info",VIDEO_BITRATE_SWITCH:"c3.video.bitrate_switch"}},(_=e.Client=function(){var e=this;this._=null,this.R=!1,this.version=_.version,this.p=null,this.A=null,this.T=null,this.S=-1,this.O=null,this.N=null,this.g=null,this.I=null,this.C=-1,this.m=!1,this.D={},this.P=function(){e.p},this.L={},this.M=null,this.U=null,this.V=null,this.k=function(){this.g.F("Client.makeIPV4IPV6GlobalSessions",(function(){var t;e.I&&null!==(t=e.I.get(z.B))&&t!==H.H&&e.A&&((t=new h).custom["c3.IPV4IPV6GlobalSession"]="T",t.custom["c3.domain"]=e.O.G.indexOf(f.j)>-1?f.j:f.K,e.W=e.A.Y(t,null),(t=new h).custom["c3.IPV4IPV6GlobalSession"]="T",t.custom["c3.domain"]=e.O.q.indexOf(f.J)>-1?f.J:f.X,e.Z=e.A.Y(t,null))}))},this.$=function(t){e.g.F("Client.updateConnectionType",(function(){if(e.M=t,e.A){var n,r=e.A.tt();for(n in r)r[n].nt(t)}}))},this.it=function(t){e.g.F("Client.updateLinkEncryption",(function(){if(e.U=t,e.A){var n,r=e.A.tt();for(n in r)r[n].et(t)}}))},this.ot=function(t){e.g.F("Client.updateSignalStrength",(function(){e.V=t}))},function(t,n,r,i){if(!(t instanceof f))throw new Error("clientSettings parameter should be an instance of ClientSettings.");if(!(n instanceof $))throw new Error("systemFactory parameter should be an instance of SystemFactory.");t.gatewayUrl!==f.rt+f.ut&&t.gatewayUrl!==f.ht+f.ut||(this.R=!0),i&&(this.version=i),this.O=t.ct(),this.T=n,this.T.lt("SDK",this.O,this.version),this.g=this.T.dt(this.version),this.g.F("Client.init",(function(){if(e.I=e.T.vt(),e.I.Et(),e.C=e.I.get(z._t),-1!==e.C&&void 0!==e.C&&null!==e.C||(e.C=ne.Rt()),e.A=e.T.At(e,e.O,e.I),r)for(var t in r)switch(t){case d.Network.CONNECTION_TYPE:e.$(r[t]);break;case d.Network.LINK_ENCRYPTION:e.it(r[t]);break;case d.Network.SIGNAL_STRENGTH:e.ot(r[t])}e.k()}),(function(e){throw new Error("Client constructor failed: "+e.message)}))}.apply(this,arguments),this.release=function(){this.m||this.g.F("Client.release",(function(){e.p,e.A.Tt(),e.A=null,e.S=-1,e.C=-1,e.g=null,e.O=null,e.N=null,e.T=null,e.m=!0}))},this.createSession=function(t,n,r){var i=_.NO_SESSION_KEY;return this.m||(!t||t instanceof h)&&this.g.F("Client.createSession",(function(){i=e.A.St(t,q.Nt.Ot,n,(r?d:e).version)})),i},this.createAdSession=function(t,n,r,i,o){var a=_.NO_SESSION_KEY;return this.m||(!n||n instanceof h)&&this.g.F("Client.createAdSession",(function(){var s,u;n||(n=new h),Z.gt(t)&&t!==_.NO_SESSION_KEY&&(s=e.A.It(t))&&(u=n.custom[d.APPLICATION_VERSION],s.wt&&s.wt.Ct&&(!n.viewerId&&s.wt.Ct.viewerId&&(n.viewerId=s.wt.Ct.viewerId),!n.applicationName&&s.wt.Ct.applicationName&&(n.applicationName=s.wt.Ct.applicationName),n.streamType===d.StreamType.UNKNOWN&&s.wt.Ct.streamType!==d.StreamType.UNKNOWN&&(n.streamType=s.wt.Ct.streamType),void 0!==u&&u||void 0!==(u=s.wt.Ct.custom[d.APPLICATION_VERSION])&&u&&(n.custom[d.APPLICATION_VERSION]=u)),n.custom["c3.csid"]=Z.yt(s.C)),a=e.A.St(n,q.Nt.Dt,r,(i?d:e).version,o)})),a},this.reportError=function(t,n,r){this.m||!Z.Pt(n)||r!==_.ErrorSeverity.FATAL&&r!==_.ErrorSeverity.WARNING||this.g.F("Client.reportError",(function(){var i=e.A.It(t);i&&i.bt(n,r)}))},this.updateContentMetadata=function(t,n){this.m||n instanceof h&&this.g.F("Client.updateContentMetadata",(function(){var r,i=e.A.It(t);i&&(r=n.ct(),i.Lt(r))}))},this.detachPlayer=function(t){this.m||this.g.F("Client.detachPlayer",(function(){var n=e.A.It(t);n&&n.Mt()}))},this.Ut=function(t){this.m||this.g.F("Client.offFocus",(function(){var n=e.A.It(t);n&&n.Ut()}))},this.attachPlayer=function(t,n){this.m||n instanceof p&&this.g.F("Client.attachPlayer",(function(){var r=e.A.It(t);r&&r.Vt(n)}))},this.kt=function(t){this.m||this.g.F("Client.onFocus",(function(){var n=e.A.It(t);n&&n.kt()}))},this.contentPreload=function(t){this.m||this.g.F("Client.contentPreload",(function(){var n=e.A.It(t);n&&n.Ft()}))},this.contentStart=function(t){this.m||this.g.F("Client.contentStart",(function(){var n=e.A.It(t);n&&n.Bt()}))},this.sendCustomEvent=function(t,n,r){this.m||Z.Pt(n)&&(Z.Ht(r),this.g.F("Client.sendCustomEvent",(function(){t===_.NO_SESSION_KEY&&(e.S<0&&(i=new h,e.S=e.A.Y(i,null)),t=e.S);var i=Z.Gt(r),o=e.A.jt(t);o&&o.Kt(n,i)})))},this.adStart=function(t,n,r,i){this.m||n!==_.AdStream.CONTENT&&n!==_.AdStream.SEPARATE||r!==_.AdPlayer.CONTENT&&r!==_.AdPlayer.SEPARATE||(i!==_.AdPosition.PREROLL&&i!==_.AdPosition.MIDROLL&&_.AdPosition.POSTROLL,this.g.F("Client.adStart",(function(){var o=e.A.It(t);o&&o.Wt(n,r,i)})))},this.adEnd=function(t){this.m||this.g.F("Client.adEnd",(function(){var n=e.A.It(t);n&&n.Yt()}))},this.cleanupSession=function(t){this.m||t!==_.NO_SESSION_KEY&&this.g.F("Client.cleanupSession",(function(){e.A.It(t)&&e.A.xt(t)}))},this.getAttachedPlayer=function(t){var n=null;return this.m||t!==_.NO_SESSION_KEY&&this.g.F("Client.getAttachedPlayer",(function(){var r=e.A.It(t);r&&(n=r.qt())})),n},this.isPlayerAttached=function(e){return!this.m&&null!==this.getAttachedPlayer(e)},this.getPlayerStateManager=function(t){if(this.m)throw new Error("This instance of Conviva.Client has been released.");return new p(this.T,(t?d:e).version)},this.releasePlayerStateManager=function(e){if(this.m)throw new Error("This instance of Conviva.Client has been released.");this.g.F("Client.releasePlayerStateManager",(function(){e instanceof p&&e.release()}))},this.Jt=function(){return this.O},this.getId=function(){return this.C},this.getSessionId=function(t){var n;return this.m?d.NO_SESSION_KEY:(n=null,this.g.F("Client.getSessionId",(function(){var r=e.A.It(t);r&&(n=r.Xt())})),n)},this.getClientId=function(t){var n;return this.m?null:(n=null,this.g.F("Client.getClientId",(function(){var r=e.A.It(t);r&&(n=r.Qt())})),n)},this.Zt=function(t,n,r){this.m||this.g.F("Client.updateCustomMetric",(function(){var i=e.A.It(t);i&&i.Zt(n,r)}))},this.setUniqueIdentifier=function(e,t){if(this.m)throw new Error("This instance of Conviva.Client has been released.");if(!e||void 0===e||"{}"===JSON.stringify(e))throw new Error("Identifiers are not set. No action taken !!");for(var n in e)this.D[n]=e[n];t&&(this.P=t)},this.setUserPreferenceForDataCollection=function(e,t){if(this.m)throw new Error("This instance of Conviva.Client has been released.");if(!e||void 0===e||"{}"===JSON.stringify(e))throw new Error("Identifiers are not set. No action taken !!");for(var n in e)"false"===e[n]?this.L[n]=t?z.$t.zt:z.$t.tn:this.L[n]=z.$t.nn},this.setUserPreferenceForDataDeletion=function(e){if(this.m)throw new Error("This instance of Conviva.Client has been released.");if(!e||void 0===e||"{}"===JSON.stringify(e))throw new Error("Identifiers are not set. No action taken !!");for(var t in e)"true"===e[t]?this.L[t]=z.$t.en:this.L[t]=z.$t.nn},this.getConfig=function(){if(this.m)throw new Error("This instance of Conviva.Client has been released.");return this.I}}).version="4.7.5L",_.NO_SESSION_KEY=d.NO_SESSION_KEY,_.AdPosition={PREROLL:d.AdPosition.PREROLL,MIDROLL:d.AdPosition.MIDROLL,POSTROLL:d.AdPosition.POSTROLL},_.AdStream={CONTENT:d.AdPlayer.CONTENT,SEPARATE:d.AdPlayer.SEPARATE},_.AdPlayer={CONTENT:d.AdPlayer.CONTENT,SEPARATE:d.AdPlayer.SEPARATE},_.ErrorSeverity={FATAL:d.ErrorSeverity.FATAL,WARNING:d.ErrorSeverity.WARNING},_.DeviceType={DESKTOP:d.DeviceType.DESKTOP,CONSOLE:d.DeviceType.CONSOLE,SETTOP:d.DeviceType.SETTOP,MOBILE:d.DeviceType.MOBILE,TABLET:d.DeviceType.TABLET,SMARTTV:d.DeviceType.SMARTTV},_.AdTechnology={CLIENT_SIDE:d.AdType.CLIENT_SIDE,SERVER_SIDE:d.AdType.SERVER_SIDE},_.AdType={BLACKOUT_SLATE:d.AdSlates.BLACKOUT_SLATE,TECHNICAL_DIFFICULTIES_SLATE:d.AdSlates.TECHNICAL_DIFFICULTIES_SLATE,COMMERCIAL_SLATE:d.AdSlates.COMMERCIAL_SLATE,OTHER_SLATE:d.AdSlates.OTHER_SLATE,VPAID:d.AdSlates.VPAID,REGULAR:d.AdSlates.REGULAR},_.AdServingType={INLINE:d.AdServingType.INLINE,WRAPPER:d.AdServingType.WRAPPER},_.DeviceCategory={ANDROID_DEVICE:d.DeviceCategory.ANDROID_DEVICE,APPLE_DEVICE:d.DeviceCategory.APPLE_DEVICE,CHROMECAST:d.DeviceCategory.CHROMECAST,DESKTOP_APP:d.DeviceCategory.DESKTOP_APP,DEVICE_SIMULATOR:d.DeviceCategory.DEVICE_SIMULATOR,LG_TV:d.DeviceCategory.LG_TV,NINTENDO:d.DeviceCategory.NINTENDO,PLAYSTATION:d.DeviceCategory.PLAYSTATION,ROKU:d.DeviceCategory.ROKU,SAMSUNG_TV:d.DeviceCategory.SAMSUNG_TV,SMART_TV:d.DeviceCategory.SMART_TV,SET_TOP_BOX:d.DeviceCategory.SET_TOP_BOX,TIVO:d.DeviceCategory.TIVO,WEB:d.DeviceCategory.WEB,WINDOWS_DEVICE:d.DeviceCategory.WINDOWS_DEVICE,XBOX:d.DeviceCategory.XBOX,KAIOS_DEVICE:d.DeviceCategory.KAIOS_DEVICE},(f=e.ClientSettings=function(){var e=this;this.on=null,Z.rn(this,"customerKey",(function(){return this.on})),Z.un(this,"customerKey",(function(e){Z.Pt(e)&&(this.on=e)})),this.hn=f.fn,Z.rn(this,"heartbeatInterval",(function(){return this.hn})),Z.un(this,"heartbeatInterval",(function(e){var t;"number"==typeof e&&(t=Z.cn(e))===e&&(this.hn=t)})),this.ln=null,this.G=null,this.q=null,Z.rn(this,"gatewayUrl",(function(){return this.ln})),Z.un(this,"gatewayUrl",(function(e){var t;!Z.Pt(e)||"https"!==(t=e.split("://"))[0]&&"http"!==t[0]||-1===e.indexOf(".com",e.length-4)||(this.ln=e)})),function(e){if(!Z.Pt(e))throw new Error("customerKey must be valid");this.customerKey=e}.apply(this,arguments),this.equals=function(e){return this.customerKey===e.customerKey&&this.gatewayUrl===e.gatewayUrl&&this.heartbeatInterval===e.heartbeatInterval},this.ct=function(){var t=new f(this.customerKey);return t.gatewayUrl=function(t){if(Z.Pt(t)){var n,r=t.split("://");if("https"===r[0]||"http"===r[0])return r[1]!==f.ut&&-1!==r[1].indexOf(f.ut)?(n=r[1].split(f.ut),e.G="https://"+n[0]+f.j,e.q="https://"+n[0]+f.J):r[1]!==f.dn&&-1!==r[1].indexOf("testonly.conviva.com")?(n=r[1].split("testonly.conviva.com"),e.G="https://"+n[0]+f.K,e.q="https://"+n[0]+f.X):r[1]===f.dn?(e.G="https://"+e.customerKey+"."+f.K,e.q="https://"+e.customerKey+"."+f.X):(e.G="https://"+e.customerKey+"."+f.j,e.q="https://"+e.customerKey+"."+f.J,t="https://"+e.customerKey+"."+f.ut),t}return e.G="https://"+e.customerKey+"."+f.j,e.q="https://"+e.customerKey+"."+f.J,"https://"+e.customerKey+"."+f.ut}(this.gatewayUrl),t.heartbeatInterval=this.heartbeatInterval,t.G=this.G,t.q=this.q,t}}).sn="https://conviva.testonly.conviva.com",f.vn="https://cws.conviva.com",f.ut="cws.conviva.com",f.j="ipv4.cws.conviva.com",f.J="ipv6.cws.conviva.com",f.dn="conviva.testonly.conviva.com",f.K="ipv4.testonly.conviva.com",f.X="ipv6.testonly.conviva.com",f.rt="https://",f.ht="http://",f.En=5,f.fn=20,(h=e.ContentMetadata=function(){this._n=null,Z.rn(this,"assetName",(function(){return this._n})),Z.un(this,"assetName",(function(e){"string"==typeof e&&(this._n=e)})),this.Rn={},Z.rn(this,"custom",(function(){return this.Rn})),Z.un(this,"custom",(function(e){"object"==typeof e&&(this.Rn=Z.Gt(e))})),this.An=null,Z.rn(this,"defaultResource",(function(){return this.An})),Z.un(this,"defaultResource",(function(e){"string"==typeof e&&(this.An=e)})),this.Tn=null,Z.rn(this,"viewerId",(function(){return this.Tn})),Z.un(this,"viewerId",(function(e){"string"==typeof e&&(this.Tn=e)})),this.Sn=null,Z.rn(this,"applicationName",(function(){return this.Sn})),Z.un(this,"applicationName",(function(e){"string"==typeof e&&(this.Sn=e)})),this.On=null,Z.rn(this,"streamUrl",(function(){return this.On})),Z.un(this,"streamUrl",(function(e){"string"==typeof e&&(this.On=e)})),this.Nn=h.StreamType.UNKNOWN,Z.rn(this,"streamType",(function(){return this.Nn})),Z.un(this,"streamType",(function(e){e!==h.StreamType.UNKNOWN&&e!==h.StreamType.VOD&&e!==h.StreamType.LIVE||(this.Nn=e)})),this.gn=-1,Z.rn(this,"duration",(function(){return this.gn})),Z.un(this,"duration",(function(e){this.gn=re.In(e)})),this.wn=-1,Z.rn(this,"encodedFrameRate",(function(){return this.wn})),Z.un(this,"encodedFrameRate",(function(e){this.wn=re.In(e)})),function(){}.apply(this,arguments),this.ct=function(){var e,t=new h;for(e in t.assetName=this.assetName,t.applicationName=this.applicationName,t.streamUrl=this.streamUrl,t.viewerId=this.viewerId,t.defaultResource=this.defaultResource,t.streamType=this.streamType,t.duration=this.duration,t.encodedFrameRate=this.encodedFrameRate,this.custom)t.custom[e]=this.custom[e];return t}}).StreamType={UNKNOWN:d.StreamType.UNKNOWN,LIVE:d.StreamType.LIVE,VOD:d.StreamType.VOD},e.ErrorType={ERROR_UNKNOWN:d.ErrorType.ERROR_UNKNOWN,ERROR_IO:d.ErrorType.ERROR_IO,ERROR_TIMEOUT:d.ErrorType.ERROR_TIMEOUT,ERROR_NULL_ASSET:d.ErrorType.ERROR_NULL_ASSET,ERROR_MISSING_PARAMETER:d.ErrorType.ERROR_MISSING_PARAMETER,ERROR_NO_AD_AVAILABLE:d.ErrorType.ERROR_NO_AD_AVAILABLE,ERROR_PARSE:d.ErrorType.ERROR_PARSE,ERROR_INVALID_VALUE:d.ErrorType.ERROR_INVALID_VALUE,ERROR_INVALID_SLOT:d.ErrorType.ERROR_INVALID_SLOT,ERROR_3P_COMPONENT:d.ErrorType.ERROR_3P_COMPONENT,ERROR_UNSUPPORTED_3P_FEATURE:d.ErrorType.ERROR_UNSUPPORTED_3P_FEATURE,ERROR_DEVICE_LIMIT:d.ErrorType.ERROR_DEVICE_LIMIT,ERROR_UNMATCHED_SLOT_SIZE:d.ErrorType.ERROR_UNMATCHED_SLOT_SIZE},e.Events={AD_REQUESTED:d.Events.AD_REQUESTED,AD_RESPONSE:d.Events.AD_RESPONSE,AD_SLOT_STARTED:d.Events.AD_SLOT_STARTED,AD_ATTEMPTED:d.Events.AD_ATTEMPTED,AD_SLOT_ENDED:d.Events.AD_SLOT_ENDED,AD_IMPRESSION_START:d.Events.AD_IMPRESSION_START,AD_START:d.Events.AD_START,AD_FIRST_QUARTILE:d.Events.AD_FIRST_QUARTILE,AD_MID_QUARTILE:d.Events.AD_MID_QUARTILE,AD_THIRD_QUARTILE:d.Events.AD_THIRD_QUARTILE,AD_COMPLETE:d.Events.AD_COMPLETE,AD_END:d.Events.AD_END,AD_IMPRESSION_END:d.Events.AD_IMPRESSION_END,AD_SKIPPED:d.Events.AD_SKIPPED,AD_ERROR:d.Events.AD_ERROR,AD_PROGRESS:d.Events.AD_PROGRESS,AD_CLOSE:d.Events.AD_CLOSE,CONTENT_PAUSED:d.Events.CONTENT_PAUSED,CONTENT_RESUMED:d.Events.CONTENT_RESUMED,POD_START:d.Events.POD_START,POD_END:d.Events.POD_END},(p=e.PlayerStateManager=function(){var t=this;t.Cn=null,t.yn=-2,t.Dn=-2,t.Pn=p.PlayerState.UNKNOWN,t.bn={},t.Ln=-2,t.wn=-2,t.gn=-2,t.Mn=null,t.Un=null,t.On=null,t.Vn=null,t.kn=null,t.Fn=-1,t.Bn=-1,t.M=null,t.U=null,t.Hn=null,t.Gn=[],t.m=!1,t.jn=null,t.Kn=null,t.Wn=null,this.release=function(){t.m||t.g.F("PlayerStateManager.release",(function(){t.Cn&&t.Cn.Yn(),t.xn(),t.T=null,t.g=null,t.m=!0}))},this.setPlayheadTime=function(){},this.setBufferLength=function(){},this.setRenderedFrameRate=function(){},this.getEncodedFrameRate=function(){return t.wn},this.setEncodedFrameRate=function(e){t.m||t.g.F("PlayerStateManager.setEncodedFrameRate",(function(){var n=re.In(e);n>=-1&&(t.wn=n,t.Cn)&&t.Cn.qn(t.wn)}))},this.getDuration=function(){return t.gn},this.setClientMeasureInterface=function(t){Z.Jn(t,new e.ClientMeasureInterface,"ClientMeasureInterface"),this.Xn=t},this.getPHT=function(){return this.Xn&&"function"==typeof this.Xn.getPHT?this.Xn.getPHT():p.DEFAULT_PHT},this.getBufferLength=function(){return this.Xn&&"function"==typeof this.Xn.getBufferLength?this.Xn.getBufferLength():p.DEFAULT_BUFFER_LENGTH},this.getSignalStrength=function(){return this.Xn&&"function"==typeof this.Xn.getSignalStrength?this.Xn.getSignalStrength():p.DEFAULT_SIGNAL_STRENGTH},this.getRenderedFrameRate=function(){return this.Xn&&"function"==typeof this.Xn.getRenderedFrameRate?this.Xn.getRenderedFrameRate():p.DEFAULT_RENDERED_FRAME_RATE},this.setDuration=function(e){t.m||t.g.F("PlayerStateManager.setDuration",(function(){var n=re.In(e);n>=-1&&(t.gn=n,t.Cn)&&t.Cn.Qn(t.gn)}))},this.getStreamUrl=function(){return t.On},this.setStreamUrl=function(e){t.m||t.g.F("PlayerStateManager.setStreamUrl",(function(){e&&(t.On=e,t.Cn)&&t.Cn.Zn(t.On)}))},this.zn=function(){return t.Vn},this.$n=function(){return t.kn},this.setModuleNameAndVersion=function(e,n){t.Vn=e,t.kn=n},this.ti=function(){return t.Un},this.setPlayerType=function(e){t.m||t.g.F("PlayerStateManager.setPlayerType",(function(){t.Un=e,t.Cn&&t.Cn.ni(t.Un)}))},this.ii=function(){return t.Mn},this.setPlayerVersion=function(e){t.m||t.g.F("PlayerStateManager.setPlayerVersion",(function(){t.Mn=e,t.Cn&&t.Cn.ei(t.Mn)}))},this.si=function(){return t.jn},this.setAudioLang=function(e){t.m||t.g.F("PlayerStateManager.setAudioLang",(function(){t.jn=e,t.Cn&&t.Cn.oi(t.jn)}))},this.ri=function(){return t.Kn},this.setSubtitleLang=function(e){t.m||t.g.F("PlayerStateManager.setSubtitleLang",(function(){t.Kn=e,t.Cn&&t.Cn.ui(t.Kn)}))},this.hi=function(){return t.Wn},this.setCcLang=function(e){t.m||t.g.F("PlayerStateManager.setCCLang",(function(){t.Wn=e,t.Cn&&t.Cn.ai(t.Wn)}))},this.setMonitoringNotifier=function(e){return!t.m&&!t.Cn&&(t.Cn=e,t.p,!0)},this.xn=function(){t.m||(t.Cn=null,t.p)},this.fi=function(){t.setPlayerState(t.getPlayerState()),t.setBitrateKbps(t.ci()),t.setAvgBitrateKbps(t.li()),t.setDuration(t.getDuration()),t.setEncodedFrameRate(t.getEncodedFrameRate()),t.setStreamUrl(t.getStreamUrl()),t.setPlayerType(t.ti()),t.setPlayerVersion(t.ii()),t.setAudioLang(t.si()),t.setSubtitleLang(t.ri()),t.setCcLang(t.hi());for(var e=0;e=-1&&(t.yn=n,t.Cn)&&t.Cn._i(t.yn)}))},this.li=function(){return t.Dn},this.setAvgBitrateKbps=function(e){t.m||t.g.F("PlayerStateManager.setAvgBitrateKbps",(function(){var n=re.In(e);n>=-1&&(t.Dn=n,t.Cn)&&t.Cn.Ri(t.Dn)}))},this.setPlayerSeekStart=function(e){t.m||t.g.F("PlayerStateManager.setPlayerSeekStart()",(function(){t.Cn&&t.Cn.pi(p.SEEK_ACTIONS_TYPE.SEEK_START,e)}))},this.setPlayerSeekEnd=function(){t.m||t.g.F("PlayerStateManager.setPlayerSeekEnd()",(function(){t.Cn&&t.Cn.pi(p.SEEK_ACTIONS_TYPE.SEEK_END,-1)}))},this.setUserSeekButtonUp=function(){t.m||t.g.F("PlayerStateManager.setUserSeekButtonUp()",(function(){t.Cn&&t.Cn.pi(p.SEEK_ACTIONS_TYPE.BUTTON_UP,-1)}))},this.setUserSeekButtonDown=function(){t.m||t.g.F("PlayerStateManager.setUserSeekButtonDown()",(function(){t.Cn&&t.Cn.pi(p.SEEK_ACTIONS_TYPE.BUTTON_DOWN,-1)}))},this.setVideoResolutionWidth=function(e){t.m||t.g.F("PlayerStateManager.setVideoResolutionWidth()",(function(){var n=re.In(e);n>0&&(t.Fn=n),t.Cn&&t.Cn.Ai(t.Fn)}))},this.setVideoResolutionHeight=function(e){t.m||t.g.F("PlayerStateManager.setVideoResolutionHeight()",(function(){var n=re.In(e);n>0&&(t.Bn=n),t.Cn&&t.Cn.Ti(t.Bn)}))},this.setConnectionType=function(e){t.m||t.g.F("PlayerStateManager.setConnectionType()",(function(){t.M=e,t.Cn&&t.Cn.nt(t.M)}))},this.setLinkEncryption=function(e){t.m||t.g.F("PlayerStateManager.setLinkEncryption()",(function(){t.U=e,t.Cn&&t.Cn.et(t.U)}))},this.setSignalStrength=function(){},this.di=function(e){var n,r;t.Hn=e,t.Cn?(n=e.errorCode,r=e.severity,t.Cn.Si(n,r)):t.Gn.push(e)},this.sendError=function(e,n){t.m||t.g.F("PlayerStateManager.sendError",(function(){var r=new ie(e,n);t.di(r)}))},this.reset=function(){t.m||t.g.F("PlayerStateManager.reset",(function(){t.yn=-2,t.Dn=-2,t.Pn=p.PlayerState.UNKNOWN,t.bn={},t.Ln=-1,t.wn=-1,t.gn=-1,t.Mn=null,t.Un=null,t.On=null,t.Hn=null,t.Gn=[]}))},this.setCDNServerIP=function(e){t.m||t.g.F("PlayerStateManager.setCDNServerIP",(function(){t.Cn&&t.Cn.Oi(e)}))},this.Ni=function(){return t.gi},this.setDroppedFramesTotal=function(e){t.m||t.g.F("PlayerStateManager.setDroppedFramesTotal",(function(){t.Cn&&t.Cn.Ii(e)}))},this.setDroppedFramesCount=function(e){t.m||t.g.F("PlayerStateManager.setDroppedFramesCount",(function(){t.Cn&&t.Cn.wi(e)}))},this.Ci=function(){return t.Hn},function(e,n){t.T=e,t.g=t.T.dt(n)}.apply(t,arguments)}).PlayerState={STOPPED:d.PlayerState.STOPPED,PLAYING:d.PlayerState.PLAYING,BUFFERING:d.PlayerState.BUFFERING,PAUSED:d.PlayerState.PAUSED,UNKNOWN:d.PlayerState.UNKNOWN,NOT_MONITORED:d.PlayerState.NOT_MONITORED},p.vi=function(e){return e===p.PlayerState.STOPPED||e===p.PlayerState.PLAYING||e===p.PlayerState.BUFFERING||e===p.PlayerState.PAUSED||e===p.PlayerState.UNKNOWN||e===p.PlayerState.NOT_MONITORED},p.SEEK_ACTIONS_TYPE={SEEK_START:"pss",SEEK_END:"pse",BUTTON_UP:"bu",BUTTON_DOWN:"bd"},p.DEFAULT_SIGNAL_STRENGTH=1e3,p.DEFAULT_RENDERED_FRAME_RATE=-1,p.DEFAULT_BUFFER_LENGTH=-1,p.DEFAULT_PHT=-1,e.ClientMeasureInterface=function(){this.getPHT=function(){},this.getBufferLength=function(){},this.getSignalStrength=function(){},this.getRenderedFrameRate=function(){}},g=e.HttpInterface=function(){this.makeRequest=function(){},this.release=function(){}},v=e.LoggingInterface=function(){this.consoleLog=function(){},this.release=function(){}},m=e.MetadataInterface=function(){this.getBrowserName=function(){},this.getBrowserVersion=function(){},this.getDeviceBrand=function(){},this.getDeviceManufacturer=function(){},this.getDeviceModel=function(){},this.getDeviceType=function(){},this.getDeviceVersion=function(){},this.getFrameworkName=function(){},this.getFrameworkVersion=function(){},this.getOperatingSystemName=function(){},this.getOperatingSystemVersion=function(){},this.getDeviceCategory=function(){},this.getScreenWidth=function(){},this.getScreenHeight=function(){},this.getScaleFactor=function(){},this.release=function(){}},y=e.StorageInterface=function(){this.saveData=function(){},this.loadData=function(){},this.release=function(){}},b=e.SystemInterface=function(){(function(e,t,n,r,i,o){Z.Jn(e,new S,"TimeInterface"),Z.Jn(t,new E,"TimerInterface"),Z.Jn(n,new g,"HttpInterface"),Z.Jn(r,new y,"StorageInterface"),Z.Jn(i,new m,"MetadataInterface"),Z.Jn(o,new v,"LoggingInterface"),this.yi=e,this.mi=t,this.Di=n,this.Pi=r,this.bi=i,this.Li=o}).apply(this,arguments),this.release=function(){this.yi&&(this.yi.release(),this.yi=null),this.mi&&(this.mi.release(),this.mi=null),this.Di&&(this.Di.release(),this.Di=null),this.Pi&&(this.Pi.release(),this.Pi=null),this.bi&&(this.bi.release(),this.bi=null),this.Li&&(this.Li.release(),this.Li=null)}},S=e.TimeInterface=function(){this.getEpochTimeMs=function(){},this.release=function(){}},E=e.TimerInterface=function(){this.createTimer=function(){},this.release=function(){}},$=e.SystemFactory=function(){var e=this;(function(e,t){if(!(e instanceof b))throw new Error("systemInterface parameter should be an instance of SystemInterface.");this.Mi=e,this.yi=this.Mi.yi,this.mi=this.Mi.mi,this.Di=this.Mi.Di,this.Pi=this.Mi.Pi,this.bi=this.Mi.bi,this.Li=this.Mi.Li,this.O=t instanceof T?t.ct():new T}).apply(this,arguments),this.lt=function(e,t,n){this.Ui=e,this.Vi=t,this.ki=n},this.release=function(){this.Mi.release(),this.Mi=null,this.Ui=null,this.O=null,this.Fi=null},this.buildLogger=function(){return new ae(e.Li,e.yi,e.Jt(),e.Fi,e.Ui)},this.At=function(e,t,n){return new Y(e,t,n,this)},this.Bi=function(e){return new te(this.buildLogger(),this.Hi(),this.Vi,e)},this.Gi=function(){return new K(this.buildTimer(e.ki))},this.ji=function(){var e=new ce(this.buildLogger(),this.mi,new Q(this.buildLogger(),null,this.Jt()));return new K(e)},this.Hi=function(){return new oe(this.buildLogger(),this.Di,this.ji(),this.Jt())},this.dt=function(e){return new Q(this.buildLogger(),this.Bi(e),this.Jt())},this.buildTime=function(){return new ue(this.yi,this.buildLogger())},this.buildTimer=function(e){return new ce(this.buildLogger(),this.mi,this.dt(e))},this.Ki=function(){return new le.Storage(this.buildLogger(),this.Pi,this.Gi(),this.Jt())},this.vt=function(){return new z(this.buildLogger(),this.Ki(),this.Wi())},this.Yi=function(e){return new se(this.buildLogger(),this.bi,this.dt(e))},this.xi=function(){return new H},this.qi=function(e,t){return new J(e,this.buildLogger(),this.Hi(),this.Wi(),t)},this.Ji=function(e,t,n,r,i){var o=this.qi(t,r.custom["c3.domain"]);return new q(this.Xi(),e,t,this.buildLogger(),this.dt(i),this.buildTimer(i),o,this.xi(),this.buildTime(),this.Qi(),n,r,i)},this.Zi=function(e,t,n,r,i,o,a){return e=this.Ji(e,t.ct(),n,o,a),new G(r,i,n,this.Yi(a),e,this.dt(a),this.buildLogger())},this.Xi=function(){return new X},this.Wi=function(){return new V},this.Qi=function(){return this.Fi},this.Jt=function(){return this.O},this.Fi=new ee},(T=e.SystemSettings=function(){this.zi=T.$i,Z.rn(this,"logLevel",(function(){return this.zi})),Z.un(this,"logLevel",(function(e){var t;"number"==typeof e&&(t=Z.cn(e))===e&&t>=T.LogLevel.DEBUG&&t<=T.LogLevel.ERROR&&(this.zi=t)})),this.te=T.ne,Z.rn(this,"allowUncaughtExceptions",(function(){return this.te})),Z.un(this,"allowUncaughtExceptions",(function(e){Z.ie(e)&&(this.te=e)})),this.ee=T.se,Z.rn(this,"storageTimeout",(function(){return this.ee})),Z.un(this,"storageTimeout",(function(e){var t;"number"==typeof e&&(t=Z.cn(e))===e&&(this.ee=t)})),this.oe=T.re,Z.rn(this,"httpTimeout",(function(){return this.oe})),Z.un(this,"httpTimeout",(function(e){var t;"number"==typeof e&&(t=Z.cn(e))===e&&(this.oe=t)})),function(){}.apply(this,arguments),this.equals=function(e){return this.logLevel===e.logLevel&&this.allowUncaughtExceptions===e.allowUncaughtExceptions&&this.storageTimeout===e.storageTimeout&&this.httpTimeout===e.httpTimeout},this.ct=function(){var e=new T;return e.logLevel=this.logLevel,e.allowUncaughtExceptions=this.allowUncaughtExceptions,e.storageTimeout=this.storageTimeout,e.httpTimeout=this.httpTimeout,e}}).LogLevel={DEBUG:d.LogLevel.DEBUG,INFO:d.LogLevel.INFO,WARNING:d.LogLevel.WARNING,ERROR:d.LogLevel.ERROR,NONE:d.LogLevel.NONE},T.ue=T.LogLevel.DEBUG,T.$i=T.LogLevel.NONE,T.he=!0,T.ne=!1,T.se=10,T.re=10,A=le.AdAnalytics=function(){var t=this;function n(e){t.ae?(Z.Ht(e)>0&&t.setAdInfo(e),t.ae.fe()||(t.ae.ce(t.le),t.ae.de(!0),t.getAdType()===d.AdType.SERVER_SIDE&&t.reportAdMetric(d.Playback.BITRATE,t.le.ve()))):t.p}t.Ee=null,t.T=null,t._e=null,t.le=null,t.ae=null,t.Re=null,t.pe=null,t.Ae=null,function(e,n,r){t.Ee=e,t.Ae=r,t.T=n,r&&(t.le=r.Te()),t._e=n.buildTimer(d.version),t.ae=new C(t.Ee,t._e),I.call(this)}.apply(this,arguments),this.setAdInfo=function(e){Z.Ht(e)<=0?t.p:(t.p,t.ae&&t.ae.Se(e))},this.setAdPlayerInfo=function(e){Z.Ht(e)<=0?t.p:(t.p,t.ae&&t.ae.Se(e))},this.reportAdMetric=function(){0===arguments.length?t.p:1===arguments.length?t.Oe(arguments[0]):2===arguments.length?t.Oe(arguments[0],arguments[1]):3===arguments.length?t.Oe(arguments[0],arguments[1],arguments[2]):4===arguments.length&&t.Oe(arguments[0],arguments[1],arguments[2],arguments[3])},this.setCallback=function(e){t.ae&&t.ae.Ne(e)},this.reportAdFailed=function(e,n){t.ae?(Z.Ht(n)>0&&t.setAdInfo(n),t.ae.fe()?(t.p,t.reportAdError(e,_.ErrorSeverity.FATAL),t.reportAdEnded()):(t.ae.ce(t.le),t.p,n=new ie(e,_.ErrorSeverity.FATAL),t.ae.de(!0,n))):t.p},this.reportAdLoaded=function(e){t.p,n(e)},this.reportAdStarted=function(e){t.p,n(e)},this.reportAdEnded=function(){t.ae?(t.p,t.ae.fe()&&(t.ae.ce(null),t.ae.de(!1))):t.p},this.reportAdError=function(e,n){t.ae?(t.p,e=new ie(e,n),t.ae.di(e)):t.p},this.reportAdPlayerEvent=function(e,n){if(Z.Pt(e))if(t.p,t.ae)switch(e){case d.Events.USER_WAIT_STARTED:case d.Events.BUMPER_VIDEO_STARTED:t.ae.Mt();break;case d.Events.USER_WAIT_ENDED:case d.Events.BUMPER_VIDEO_ENDED:t.ae.Vt();break;default:t.ae.ge(e,n)}else t.p;else t.p},this.reportAdSkipped=function(){t.ae?(t.p,t.reportAdPlayerEvent(d.Events.AD_SKIPPED),t.reportAdEnded()):t.p},this.release=function(){t.p,t.ae&&(t.ae.fe()&&(t.ae.ce(null),t.ae.de(!1)),t.ae.Ne(null),t.ae.Ie(),t.ae=null),void 0!==e.AdProxyMonitor&&t.pe&&(e.AdProxyMonitor.release(t.pe),t.pe=null)},this.setAdListener=function(n,r){n&&(void 0!==r&&void 0!==r.convivaModule?e.AdProxyMonitor=r.convivaModule.AdProxyMonitor:"undefined"!=typeof ConvivaModule&&(e.AdProxyMonitor=ConvivaModule.AdProxyMonitor),void 0!==e.AdProxyMonitor)&&(!n&&t.pe?(e.AdProxyMonitor.release(t.pe),t.pe=null):n&&t.pe?(e.AdProxyMonitor.release(t.pe),t.p,t.pe=e.AdProxyMonitor.initConvivaDropIn(n,r,this,e,t.T)):n&&!t.pe&&(t.p,t.pe=e.AdProxyMonitor.initConvivaDropIn(n,r,this,e,t.T)))},this.reportAdBreakStarted=function(e,n,r){t.le&&(t.p,t.we=e,t.Re=n,t.le.Ce(e,n,r))},this.reportAdBreakEnded=function(){t.le&&(t.p,t.we=null,t.Re=null,t.le.ye())},this.getSessionId=function(){return t.le?(t.p,t.ae.Xt()):d.NO_SESSION_KEY},this.getClientId=function(){return t.le?(t.p,t.ae.Qt()):null},this.getPlayerMonitor=function(){return t.le},this.getAdPlayerMonitor=function(){return t.ae},this.getVideoAnalytics=function(){return t.Ae},this.getAdType=function(){return t.le?t.le.we:null},this.me=function(){return t.le?t.le.Re:null},A.prototype=Object.create(I.prototype),A.prototype.constructor=A},C=le.AdPlayerMonitorImpl=function(){var e=this;e.De=null,e.Pe=null,function(e,t){k.call(this,e,t)}.apply(this,arguments),this.ce=function(t){this.be()!==t&&(this.Le(),e.Pe=t||null)},this.be=function(){return e.Pe},this.Me=function(t){var n,r=this.be(),i={};i.error=t,e.De&&(e.Ue=e.De.getPlayerStateManager(!0),e.Ve(),e.Ue.setClientMeasureInterface(this),n=null,r&&(n=r.ke()),e.Fe=e.De.createAdSession(n,e.Ct,e.Ue,!0,i),void 0!==t)&&(e.Be(),e.Ie())},C.prototype=Object.create(k.prototype),C.prototype.constructor=C},P=e.Analytics={init:function(){if(this.Ee,arguments.length<=0)throw new Error("customerKey must be valid");var t=null,n=null,r=null;if("string"==typeof arguments[0]&&!Z.Pt(t=arguments[0]))throw new Error("customerKey must be valid");arguments.length>=2&&"object"==typeof arguments[1]&&(n=arguments[1]),arguments.length>=3&&"object"==typeof arguments[2]&&(r=arguments[2]),t=new f(t);var i=new T,o=(Z.Ht(r)>0&&(r[d.GATEWAY_URL]&&(t.gatewayUrl=r[d.GATEWAY_URL]),r[d.LOG_LEVEL]>=0)&&(i.logLevel=r[d.LOG_LEVEL]),r=new e.Impl.Html5Logging,new e.Impl.Html5Storage),a=new e.Impl.Html5Http,s=new e.Impl.Html5Timer,u=new e.Impl.Html5Time;this.bi||(this.bi=new e.Impl.Html5Metadata),n&&(n[d.CallbackFunctions.CONSOLE_LOG]&&(r.consoleLog=n[d.CallbackFunctions.CONSOLE_LOG]),n[d.CallbackFunctions.MAKE_REQUEST]&&(a.makeRequest=n[d.CallbackFunctions.MAKE_REQUEST]),n[d.CallbackFunctions.SAVE_DATA]&&(o.saveData=n[d.CallbackFunctions.SAVE_DATA]),n[d.CallbackFunctions.LOAD_DATA]&&(o.loadData=n[d.CallbackFunctions.LOAD_DATA]),n[d.CallbackFunctions.GET_EPOCH_TIME_IN_MS]&&(u.getEpochTimeMs=n[d.CallbackFunctions.GET_EPOCH_TIME_IN_MS]),n[d.CallbackFunctions.CREATE_TIMER])&&(s.createTimer=n[d.CallbackFunctions.CREATE_TIMER]),this.Mi=new b(u,s,a,o,this.bi,r),this.T=new $(this.Mi,i),this.T.lt("Analytics",t),this.Ee=new _(t,this.T,this.He,P.version),this.Ee._=new w(this.Ee,this),this.Ee._&&this.Ee._.Ge()},release:function(){var e=0;if(this.je){for(e=0;e=2&&"CONVIVA"!==p?a(p,t()):g===I.Ye.xe?a(-1,I.Ye.xe):a(-1,t());break;case d.Playback.SEEK_ENDED:g===I.Ye.xe?s(I.Ye.xe):s(t());break;case d.Playback.CDN_IP:$=p,T=t(),Z.Pt($)&&(!e.ae||T!==I.Ye.xe&&T!==I.Ye.We||e.ae.os($),!e.le||T!==I.Ye.qe&&T!==I.Ye.We||e.le.os($));break;case d.Playback.DROPPED_FRAMES_TOTAL:T=p,$=t(),T=parseInt(T,10),isNaN(T)||(!e.ae||$!==I.Ye.xe&&$!==I.Ye.We||e.ae.rs(T),!e.le)||$!==I.Ye.qe&&$!==I.Ye.We||e.le.rs(T);break;case d.Playback.DROPPED_FRAMES_COUNT:var m=p,y=t();m=parseInt(m,10),isNaN(m)||(!e.ae||y!==I.Ye.xe&&y!==I.Ye.We||e.ae.us(m),!e.le)||y!==I.Ye.qe&&y!==I.Ye.We||e.le.us(m);break;case d.Playback.AUDIO_LANGUAGE:y=p,m=t(),Z.Pt(y)&&(!e.ae||m!==I.Ye.xe&&m!==I.Ye.We||e.ae.hs(y),!e.le||m!==I.Ye.qe&&m!==I.Ye.We||e.le.hs(y));break;case d.Playback.SUBTITLES_LANGUAGE:_(p,t());break;case d.Playback.CLOSED_CAPTIONS_LANGUAGE:f(p,t());break;default:b=h,S=p,E=t(),Z.Pt(b)&&S&&(!e.ae||E!==I.Ye.xe&&E!==I.Ye.We||e.ae.Zt(b,S),!e.le||E!==I.Ye.qe&&E!==I.Ye.We||e.le.Zt(b,S))}var b,S,E,$,T}},le.AnalyticsImpl.Ye={xe:1,qe:2,We:3},w=le.AppAnalyticsHandler=function(){var e=this;e.Ee=null,e.fs=null,e.cs=null,e.ls=null,e.wt=null,function(t,n){e.Ee=t,e.fs=n,"undefined"!=typeof document&&document&&(e.cs=document.createEvent("HTMLEvents"),e.cs.initEvent(d.APP_TRACKER_EVENT.TYPE,!0,!0))}.apply(this,arguments),this.Ge=function(){e.ds(d.APP_TRACKER_EVENT.INIT)},this.vs=function(){e.ds(d.APP_TRACKER_EVENT.VIDEO_ATTEMPT)},this.Es=function(){e.ds(d.APP_TRACKER_EVENT.VIDEO_END),e.wt=null},this._s=function(t){e.ds(d.APP_TRACKER_EVENT.VIDEO_PLAY,t)},this.Rs=function(t){e.ds(d.APP_TRACKER_EVENT.VIDEO_PAUSE,t)},this.ps=function(t){e.ds(d.APP_TRACKER_EVENT.VIDEO_ERROR,t)},this.As=function(t){e.ds(d.APP_TRACKER_EVENT.VIDEO_BUFFERING,t)},this.Ts=function(t){e.ds(d.APP_TRACKER_EVENT.VIDEO_BITRATE_SWITCH,t)},this.Ss=function(t){e.ds(d.APP_TRACKER_EVENT.VIDEO_METADATA_CHANGE,t)},this.Os=function(t){t={cen:t.name,ced:t.data},e.ds(d.APP_TRACKER_EVENT.VIDEO_CUSTOM_EVENT,t)},this.Ns=function(t){t={cen:t.name,ced:t.data},e.ds(d.APP_TRACKER_EVENT.SDK_CUSTOM_EVENT,t)},this.gs=function(t){e.ds(d.APP_TRACKER_EVENT.AD_BREAK_START,{cen:"PodStart",ced:t})},this.Is=function(){e.ds(d.APP_TRACKER_EVENT.AD_BREAK_END,{cen:"PodEnd"})},this.ds=function(t,n){try{if(e.cs){if(e.ws(),e.cs.name=e.ls.name=t,e.cs.iid=e.ls.iid=e.Ee.getConfig().getIid(),e.cs.clid=e.ls.clid=e.Ee.getConfig().getClientId(),e.wt){var r=e.wt;if(r.Cs()?(e.cs.sid=e.ls.sid=r.ys.Xt(),e.cs.sst=e.ls.sst=r.Ds,e.cs.url=e.ls.url=r.On,e.cs.st=e.ls.st=r.Ps(),e.cs.an=e.ls.an=r._n,e.cs.pn=e.ls.pn=r.bs,e.cs.tags=e.ls.tags=JSON.stringify(r.Ct.Rn),e.cs.vid=e.ls.vid=r.Tn,r.Ls>=0&&(e.cs.cl=e.ls.cl=r.Ls),e.cs.lv=e.ls.lv=r.Ms,e.cs.fw=e.ls.fw=r.Us(),e.cs.fwv=e.ls.fwv=r.Vs(),e.cs.mn=e.ls.mn=r.Vn,e.cs.mv=e.ls.mv=r.kn,r.yn>=0&&(e.cs.br=e.ls.br=r.yn)):r.ks()&&(e.cs.sid=e.ls.sid=r.ys.Xt(),e.cs.sst=e.ls.sst=r.Ds,e.cs.st=e.ls.st=r.Ps(),e.cs.mn=e.ls.mn=r.Vn,e.cs.mv=e.ls.mv=r.kn),n)for(var i=Object.keys(n),o=0;o0&&e.Ue.setBitrateKbps(e.ve()),e.No()>0&&e.Ue.setAvgBitrateKbps(e.No()),e.mo()>0&&e.Ue.setVideoResolutionWidth(e.mo()),e.Po()>0&&e.Ue.setVideoResolutionHeight(e.Po()),e.wo()&&e.Ue.setCDNServerIP(e.wo()),Z.gt(e.Ni())&&e.Ue.setDroppedFramesTotal(e.Ni()),Z.Pt(e.si())&&e.Ue.setAudioLang(e.si()),Z.Pt(e.ri())&&e.Ue.setSubtitleLang(e.ri()),Z.Pt(e.hi()))&&e.Ue.setCcLang(e.hi())},this.Lt=function(){e.Fe!==_.NO_SESSION_KEY&&e.De&&e.De.updateContentMetadata(e.Fe,e.Ct)},this.Ve=function(){if(e.Ue){e.co&&Z.Ht(e.co)>0&&(e.co[d.MODULE_NAME]&&e.co[d.MODULE_VERSION]&&(t=e.co[d.MODULE_NAME],n=e.co[d.MODULE_VERSION],Z.Pt(t))&&Z.Pt(n)&&e.Ue.setModuleNameAndVersion(t,n),e.co[d.FRAMEWORK_NAME]&&(t=e.co[d.FRAMEWORK_NAME],Z.Pt(t))&&e.Ue.setPlayerType(t),e.co[d.FRAMEWORK_VERSION])&&(n=e.co[d.FRAMEWORK_VERSION],Z.Pt(n))&&e.Ue.setPlayerVersion(n);var t,n,r=e.Ko();e.Wo();for(var i=0;i>>0;if("function"!=typeof e)throw new TypeError;for(var r,i=[],o=arguments.length>=2?arguments[1]:void 0,a=0;a=0})).join("&")))&&(e.Ct.custom[d.UTM_TRACKING_URL]=t)}catch(t){e.p.error("PlayerMonitorImpl _createSession : "+t)}e.Fe=e.De.createSession(e.Ct,e.Ue,!0)}},this.Ho=function(){e.De&&(e.Ue&&(e.Ue.setPlayerState(d.PlayerState.STOPPED),e.Ue=null),e.Fe!==d.NO_SESSION_KEY)&&(e.De.cleanupSession(e.Fe),e.Fe=d.NO_SESSION_KEY)},this.Si=function(){if(e.De&&e.Fe!==_.NO_SESSION_KEY){var t=e.Ko();e.Wo();for(var n=0;n0&&(a.timeout=i,a.ontimeout=function(){a.ontimeout=a.onreadystatechange=null,o&&o(!1,"timeout after "+i+" ms")}),a.onreadystatechange=function(){4===a.readyState&&(a.ontimeout=a.onreadystatechange=null,200===a.status?o&&o(!0,a.responseText):o&&o(!1,"http status "+a.status))},a.send(n),null},this.release=function(){}},e.Impl=e.Impl||{},e.Impl.Html5Logging=function(){(function(){}).apply(this,arguments),this.consoleLog=function(e,t){void 0!==s&&(s.log&&t===T.LogLevel.DEBUG||t===T.LogLevel.INFO?s.log(e):s.warn&&t===T.LogLevel.WARNING?s.warn(e):s.error&&t===T.LogLevel.ERROR&&s.error(e))},this.release=function(){}},e.Impl=e.Impl||{},e.Impl.Html5Metadata=function(){(function(){}).apply(this,arguments),this.getBrowserName=function(){return null},this.getBrowserVersion=function(){return null},this.getDeviceBrand=function(){return null},this.getDeviceManufacturer=function(){return null},this.getDeviceModel=function(){return null},this.getDeviceType=function(){return null},this.getDeviceVersion=function(){return null},this.getFrameworkName=function(){return null},this.getFrameworkVersion=function(){return null},this.getOperatingSystemName=function(){return null},this.getOperatingSystemVersion=function(){return null},this.getDeviceCategory=function(){return null},this.getScreenWidth=function(){return"undefined"!=typeof window&&window&&window.screen&&window.screen.width?window.screen.width.toString():null},this.getScreenHeight=function(){return"undefined"!=typeof window&&window&&window.screen&&window.screen.height?window.screen.height.toString():null},this.getScaleFactor=function(){return"undefined"!=typeof window&&window&&window.devicePixelRatio?window.devicePixelRatio.toString():null},this.release=function(){}},e.Impl=e.Impl||{},e.Impl.Html5Storage=function(){(function(){}).apply(this,arguments),this.saveData=function(e,t,n,r){e=e+"."+t;try{localStorage.setItem(e,n),r(!0,null)}catch(e){r(!1,e.toString())}},this.loadData=function(e,t,n){e=e+"."+t;try{n(!0,localStorage.getItem(e))}catch(e){n(!1,e.toString())}},this.release=function(){}},e.Impl=e.Impl||{},e.Impl.Html5Time=function(){(function(){}).apply(this,arguments),this.getEpochTimeMs=function(){return(new Date).getTime()},this.release=function(){}},e.Impl=e.Impl||{},e.Impl.Html5Timer=function(){(function(){}).apply(this,arguments),this.createTimer=function(e,t){var n=setInterval(e,t);return function(){-1!==n&&(clearInterval(n),n=-1)}},this.release=function(){}},O=le.VideoAnalytics=function(){var t=this;t.Ee=null,t.T=null,t._e=null,t.le=null,t.pe=null,this.release=function(){t.p,t.le&&t.le.fe()&&t.le.de(!1),void 0!==e.ProxyMonitor&&t.pe&&(e.ProxyMonitor.release(t.pe),t.pe=null),t.le&&(t.le.Ne(null),t.le.Ie(),t.le=null),t._e=null},function(e,n){t.Ee=e,t.T=n,t._e=n.buildTimer(d.version),t.le=new k(t.Ee,t._e),I.call(this)}.apply(this,arguments),this.reportPlaybackRequested=function(e){t.p,t.le&&(Z.Ht(e)>0&&t.setContentInfo(e),t.le.fe()||t.le.de(!0))},this.reportPlaybackEnded=function(){t.p,t.le&&t.le.fe()&&(t.le.de(!1),void 0!==e.ProxyMonitor&&t.pe&&(e.ProxyMonitor.release(t.pe),t.pe=null),t.le.Ne(null))},this.reportPlaybackFailed=function(e,n){t.le&&(Z.Ht(n)>0&&t.setContentInfo(n),t.le.fe()||t.le.de(!0),t.p,t.reportPlaybackError(e,_.ErrorSeverity.FATAL),t.reportPlaybackEnded())},this.setContentInfo=function(e){Z.Ht(e)<=0||t.le&&(t.p,t.le.Se(e))},this.setPlayerInfo=function(e){Z.Ht(e)<=0||t.le&&(t.p,t.le.Se(e))},this.reportPlaybackMetric=function(){0!==arguments.length&&(1===arguments.length?t.Oe(arguments[0]):2===arguments.length?t.Oe(arguments[0],arguments[1]):3===arguments.length?t.Oe(arguments[0],arguments[1],arguments[2]):4===arguments.length&&t.Oe(arguments[0],arguments[1],arguments[2],arguments[3]))},this.reportPlaybackError=function(e,n){t.le&&Z.Pt(e)&&(t.p,e=new ie(e,n),t.le.di(e))},this.reportPlaybackEvent=function(e,n){if(Z.Pt(e)&&t.le&&(t.p,t.le))switch(e){case d.Events.USER_WAIT_STARTED:case d.Events.BUMPER_VIDEO_STARTED:t.le.Mt();break;case d.Events.USER_WAIT_ENDED:case d.Events.BUMPER_VIDEO_ENDED:t.le.Vt();break;default:t.le.ge(e,n)}},this.setCallback=function(e){t.p,t.le&&t.le.Ne(e)},this.reportAdBreakStarted=function(e,n,r){t.le&&(t.p,t.le.Ce(e,n,r))},this.reportAdBreakEnded=function(){t.le&&(t.p,t.le.ye())},this.setPlayer=function(n,r){var i,o;void 0!==n&&(r&&(i=r[d.CONVIVA_MODULE],o=r[d.MEDIA_ELEMENT]),void 0!==i?e.ProxyMonitor=i.ProxyMonitor:"undefined"!=typeof ConvivaModule&&(e.ProxyMonitor=ConvivaModule.ProxyMonitor),void 0!==e.ProxyMonitor)&&(t.p,!n&&t.pe?(e.ProxyMonitor.release(t.pe),t.pe=null):n?(t.pe&&e.ProxyMonitor.release(t.pe),t.p,t.pe=void 0!==o?e.ProxyMonitor.initConvivaDropIn(n,o,t.T,this,e):e.ProxyMonitor.initConvivaDropIn(n,t.T,this,e)):void 0!==o&&(t.pe=e.ProxyMonitor.initConvivaDropIn(n,o,t.T,this,e)))},this.setAdAnalytics=function(e){e?t.getAdType()&&(t.getAdType()===d.AdType.SERVER_SIDE?t.ae=e.getAdPlayerMonitor():t.getAdType()===d.AdType.CLIENT_SIDE&&t.p):t.ae=null},this.configureExistingSession=function(e){e!==d.NO_SESSION_KEY&&t.le&&(t.p,t.le.rr(e))},this.getSessionId=function(){return t.le?(t.p,t.le.Xt()):d.NO_SESSION_KEY},this.getClientId=function(){return t.le?(t.p,t.le.Qt()):null},this.Te=function(){return t.p,this.le},this.getAdType=function(){return t.le?t.le.we:null},this.me=function(){return t.le?t.le.Re:null},O.prototype=Object.create(I.prototype),O.prototype.constructor=O},le.JsonParse=(i={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},o=function(e){throw{name:"SyntaxError",message:e,at:t,text:r}},a=function(e){return e&&e!==n&&o("Expected '"+e+"' instead of '"+n+"'"),n=r.charAt(t),t+=1,n},u=function(){var e,t,r,s="";if('"'===n)for(;a();){if('"'===n)return a(),s;if("\\"===n)if(a(),"u"===n){for(t=r=0;t<4&&(e=parseInt(a(),16),isFinite(e));t+=1)r=16*r+e;s+=String.fromCharCode(r)}else{if("string"!=typeof i[n])break;s+=i[n]}else s+=n}o("Bad string")},c=function(){for(;n&&n<=" ";)a()},l=function(){switch(c(),n){case"{":var e,t={};if("{"===n){if(a("{"),c(),"}"===n)return a("}"),t;for(;n;){if(e=u(),c(),a(":"),Object.hasOwnProperty.call(t,e)&&o('Duplicate key "'+e+'"'),t[e]=l(),c(),"}"===n)return a("}"),t;a(","),c()}}return void o("Bad object");case"[":var r=[];if("["===n){if(a("["),c(),"]"===n)return a("]"),r;for(;n;){if(r.push(l()),c(),"]"===n)return a("]"),r;a(","),c()}}return void o("Bad array");case'"':return u();case"-":return de();default:return(n>="0"&&n<="9"?de:function(){switch(n){case"t":return a("t"),a("r"),a("u"),a("e"),!0;case"f":return a("f"),a("a"),a("l"),a("s"),a("e"),!1;case"n":return a("n"),a("u"),a("l"),a("l"),null}o("Unexpected '"+n+"'")})()}},function(e,i){return r=e,t=0,n=" ",e=l(),c(),n&&o("Syntax error"),"function"==typeof i?function e(t,n){var r,o,a=t[n];if(a&&"object"==typeof a)for(r in a)Object.hasOwnProperty.call(a,r)&&(void 0!==(o=e(a,r))?a[r]=o:delete a[r]);return i.call(t,n,a)}({"":e},""):e}),U=le.JSON2={},"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+_e(this.getUTCMonth()+1)+"-"+_e(this.getUTCDate())+"T"+_e(this.getUTCHours())+":"+_e(this.getUTCMinutes())+":"+_e(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}),"function"!=typeof U.stringify&&(R=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,x={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},U.stringify=function(e,t,n){var r;if(L=D="","number"==typeof n)for(r=0;r=0;n--)t+=j.hr.charAt(e>>4*n&15);return t},cr:function(e){for(var t=1+(e.length+8>>6),n=new Array(16*t),r=0;r<16*t;r++)n[r]=0;for(r=0;r>2]|=e.charCodeAt(r)<<24-r%4*8;return n[r>>2]|=128<<24-r%4*8,n[16*t-1]=8*e.length,n},lr:function(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n},dr:function(e,t){return e<>>32-t},vr:function(e,t,n,r){return e<20?t&n|~t&r:!(e<40)&&e<60?t&n|t&r|n&r:t^n^r},Er:function(e){return e<20?1518500249:e<40?1859775393:e<60?-1894007588:-899497514},_r:function(e){for(var t="",n=0;n=0||this.getAllResponseHeaders().indexOf("X-Cache")>=0)?e.fc("Akamai","header","X-Cache",""+this.getResponseHeader("X-Cache"),""+this.status):e.fc("null","header","null","null",""+this.status))},t.send()):e.p.info("xmlhttpreq is not available here to fetch CDN Server Ip")}catch(t){e.p.info("Exception caught in makeAkamaiHeadRequest")}},this.fc=function(t,n,r,i,o){var a={},s={};e.mf!==t&&(null!==e.mf&&(s[H.Lu]=e.mf),e.mf=t,null===e.mf?a[H.Lu]="null":a[H.Lu]=e.mf),e.Df!==n&&(null!==e.Df&&(s[H.Mu]=e.Df),e.Df=n,null===e.Df?a[H.Mu]="null":a[H.Mu]=e.Df),e.Pf!==r&&(null!==e.Pf&&(s[H.Uu]=e.Pf),e.Pf=r,null===e.Pf?a[H.Uu]="null":a[H.Uu]=e.Pf),e.bf!==i&&(null!==e.bf&&(s[H.Vu]=e.bf),e.bf=i,null===e.bf?a[H.Vu]="null":a[H.Vu]=e.bf),e.Lf!==o&&(null!==e.Lf&&(s[H.ku]=e.Lf),e.Lf=o,null===e.Lf?a[H.ku]="null":a[H.ku]=e.Lf),"{}"!==JSON.stringify(a)&&e.lc(a,s)},this.dc=function(t){var n=e.yn;n!==t&&t>0&&(e.p.info("Change bitrate from "+n+" to "+t),e.vc(n,t),e.yn=t)},this.Ec=function(t){var n=e.Dn;n!==t&&t>0&&(e.p.info("Change Avg bitrate from "+n+" to "+t),e._c(n,t),e.Dn=t)},this.wa=function(t){var n=e.gi;n!==t&&t>=0&&(e.p.info("Change dropped frames total from "+n+" to "+t),e.Rc(n,t),e.gi=t)},this.Co=function(t){var n=e.$a,r=t+(-1===e.$a?0:e.$a);n!==t&&r>=0&&(e.p.info("Change dropped frames count from "+n+" to "+r),e.Ac(n,r),e.$a=r)},this.oa=function(t){var n=e.tf;n!==t&&t&&(e.p.info("Change resource from "+n+" to "+t),e.tf=t)},this.xh=function(t){e._n!==t&&t&&(e.p.info("Change assetName from "+e._n+" to "+t),e._n=t)},this.Vh=function(t){var n=e.Ms;n!==t&&Z.ie(t)&&(e.p.info("Change isLive from "+n+" to "+t),e.Ms=t)},this.Yh=function(t){var n=e.Tn;n!==t&&t&&(e.p.info("Change viewerId from "+n+" to "+t),e.Tn=t)},this.qh=function(t){var n=e.bs;n!==t&&t&&(e.p.info("Change playerName from "+n+" to "+t),e.bs=t)},this.Jh=function(t){var n=e.nf;!Z.Tc(n,t)&&t&&(e.p.info("Change tags from "+Z.Sc(n)+" to "+Z.Sc(t)),e.nf=t)},this.ra=function(t){e.Ct.encodedFrameRate>0||(e.p.debug("setEncodedFrameRate(): "+t),e.wn=t)},this.ia=function(t){e.Ct.duration>0||(e.p.debug("setContentLength(): "+t),e.Ls=t)},this.Xe=function(t){var n;e.Tf||t!==p.PlayerState.PLAYING||(e.Tf=!0,Z.Pt(e.Ct.viewerId)||e.p.error("Missing viewerId. viewerId should be updated before first frame is rendered."),Z.Pt(e.Ct.streamType)&&h.StreamType.UNKNOWN!==e.Ct.streamType||e.p.error("Missing streamType - Live or VOD. streamType should be updated before first frame is rendered."),Z.Pt(e.Ct.applicationName))||e.p.error("Missing applicationName. applicationName should be updated before first frame is rendered."),e.Pn!==t&&(n=e.Pn,e.p.info("setPlayerState(): changing player state from "+n+" to "+t),e.Oc(n,t),e.Pn=t)},this.Nc=function(t){var n=e.Fn;n!==t&&t>0&&(e.p.debug("Change stream resolution width from "+n+" to "+t),e.gc(n,t),e.Fn=t)},this.Ic=function(t){var n=e.Bn;n!==t&&t>0&&(e.p.debug("Change stream resolution height from "+n+" to "+t),e.wc(n,t),e.Bn=t)},this.ba=function(t){var n=e.M;n!==t&&t&&(e.p.debug("Change network connection type from "+n+" to "+t),e.Cc(n,t),e.M=t)},this.La=function(t){var n=e.U;n!==t&&t&&(e.p.debug("Change network link encryption from "+n+" to "+t),e.yc(n,t),e.U=t)},this.ka=function(t){e.kf=!0,e.ec();var n=e.ao;n!==t&&Z.Pt(t)&&(e.p.debug("Change CDN Server IP from "+n+" to "+t),e.mc(n,t),e.ao=t)},this.Ka=function(t){var n=e.jn;n!==t&&Z.Pt(t)&&!e.ys.Dc&&(e.p.info("Change Audio Lang from "+n+" to "+t),e.Pc(n,t),e.jn=t)},this.Wa=function(t){var n=e.Kn;n!==t&&Z.Pt(t)&&!e.ys.bc&&(e.p.info("Change Subtitle Lang from "+n+" to "+t),e.Lc(n,t),e.Kn=t)},this.Ya=function(t){var n=e.Wn;n!==t&&Z.Pt(t)&&!e.ys.Mc&&(e.p.info("Change Closed Caption Lang from "+n+" to "+t),e.Uc(n,t),e.Wn=t)},this.Vc=function(t){var n;e.p.debug("togglePauseJoin()"),e.Af===t?e.p.debug("togglePauseJoin(): same value, ignoring"):(t=e.Af,n=!e.Af,e.kc(t,n),e.Af=!e.Af)},this.Fc=function(t,n){e.Bc(t,n)},this.Hc=function(e,t){var n,r;t[H.sh]=e,t[H.rh]=this.Ps(),t[H.oh]=this.Bf.Gc(),this.Ue&&(n=re.jc(this.Ue.getPHT(),0,null,-1),r=re.jc(this.Ue.getBufferLength(),0,null,-1),n>=0&&(t[H.pu]=n),r>0)&&(t[H.Au]=r),this.Bf.Kc(t),this.Ee._&&this.Ee._.Fs(e,t,this)},this.Wc=function(t){e.Ue=t,e.Ue?e.Yc():e.xc()},this.ic=function(){var e=this.Gf.Ar(this.qc(),this.Ps());this.Ee._&&this.Ee._.Fs(H.Xs,{},this),this.Bf.Kc(e)},this.Bc=function(e,t){var n={};n[H.qs]=e,n[H.Js]=t,this.Hc(H.xs,n)},this.vc=function(e,t){var n={},r={};e>0&&(r[H.Ys]=e),n[H.Ys]=t,this.lc(n,r)},this._c=function(e,t){var n={},r={};e>0&&(r[H.cu]=e),n[H.cu]=t,this.lc(n,r)},this.Jc=function(e,t){var n={};n[H.uh]=e,t>=0&&(n[H.hh]=t),this.Hc(H.yr,n)},this.gc=function(e,t){var n={},r={};-1!==e&&(r[H.Nu]=e),n[H.Nu]=t,this.lc(n,r)},this.wc=function(e,t){var n={},r={};-1!==e&&(r[H.gu]=e),n[H.gu]=t,this.lc(n,r)},this.Cc=function(e,t){var n={},r={};null!==e&&(r[H.Iu]=e),n[H.Iu]=t,this.lc(n,r)},this.yc=function(e,t){var n={},r={};null!==e&&(r[H.wu]=e),n[H.wu]=t,this.lc(n,r)},this.mc=function(e,t){var n={},r={};Z.Pt(e)&&(r[H._h]=e),n[H._h]=t,this.lc(n,r)},this.Rc=function(e,t){var n={},r={};e>=0&&(r[H.Cu]=e),n[H.Cu]=t,this.lc(n,r)},this.Ac=function(e,t){var n={},r={};e>=0&&(r[H.yu]=e),n[H.yu]=t,this.lc(n,r)},this.Pc=function(e,t){var n={},r={};e!==t&&("string"==typeof e&&(r[H.mu]=e),n[H.mu]=t),this.lc(n,r)},this.Lc=function(e,t){var n={},r={};e!==t&&("string"==typeof e&&(r[H.Du]=e),n[H.Du]=t),this.lc(n,r)},this.Uc=function(e,t){var n={},r={};e!==t&&("string"==typeof e&&(r[H.Pu]=e),n[H.Pu]=t),this.lc(n,r)},this.kc=function(e,t){var n={},r={};r[H.fu]=e,n[H.fu]=t,this.lc(n,r)},this.Oc=function(e,t){var n={},r={};n[H.Gs]=H.Rh(t),r[H.Gs]=H.Rh(e),this.lc(n,r)},this.lc=function(e,t){var n={};n[H.Hs]=e,t&&Z.Ht(t)>0&&(n[H.ah]=t),this.Hc(H.Bs,n)},this.Xc=function(e,t){var n={};n[H.Zs]=e,Z.Ht(t)>0&&(n[H.zs]=t),this.Hc(H.Qs,n)},this.sc=function(){e.qa&&(e.qa(),e.qa=null)},this.uc=function(){e.sc();var t=1e3*e.Vi.heartbeatInterval;e.qa=e._e.create(e.oc,t,"Session.sendHeartbeat:"+this.xf)},this.xc=function(){e.Nf&&(e.Nf(),e.Nf=null)},this.Yc=function(){e.xc(),e.Nf=e._e.create(e.Qc,e.gf,"Session.startRfpsTimer")},this.Zc=function(){var t={err:"pending"};t.seq=e.Ja-1,t.sentAt=e.Ps(),t.rtt=-1,e.Za.push(t);for(var n=0;n0&&o.Jh(e.nf),e.Cs()||e.qf()){if(e.qf()&&o.Ma(),e._n&&o.xh(e._n),o.Xh(e.Xa),a=H.Rh(e.Pn),o.Xe(a),o.na(e.Af),e.bs&&o.qh(e.bs),Z.ie(e.Ms)&&o.Vh(e.Ms),e.Ls>0&&o.ia(e.Ls),e.yn>0&&o.ea(e.yn),e.Dn>0&&o.sa(e.Dn),null!==e.tf&&o.oa(e.tf),e.wn>0&&o.ra(e.wn),e.Ue&&(n=re.jc(e.Ue.getPHT(),0,null,-1),r=re.jc(e.Ue.getBufferLength(),0,null,-1)),Z.gt(e.Ee.V)?t=e.Ee.V:e.Ue&&(t=e.Ue.getSignalStrength()),n>=0&&o.Ca(n),r>0&&o.ya(r),(a=e.sl())>0&&o.ua(a),e.wf>0&&o.aa(re.jc(e.wf,0,null,-1)),e.If>0&&o.ha(re.jc(e.If,0,null,-1)),t!==p.DEFAULT_SIGNAL_STRENGTH&&o.Ua(t),e.On&&o.ma(e.On),e.Fn>0&&o.Da(e.Fn),e.Bn>0&&o.Pa(e.Bn),e.gi>-1&&o.wa(e.gi),e.$a>-1&&(o.Co(e.$a),e.$a>0)&&(e.Ac(e.$a,0),e.$a=0),e.jn&&o.Ka(e.jn),e.Kn&&o.Wa(e.Kn),e.Wn&&o.Ya(e.Wn),void 0!==e.pf)for(var s in e.pf)o.Ph(s,e.pf[s])}else o.Xh(H.Sh.Oh);return i.length>0&&o.Zh(i),o.Qh(e.Qa),o.zh(!0),e.Kf.get(z.ol)&&o.$h(e.Fi.Wf()),e.Kf.get(z.nl)>0&&(n=e.il()).length>0&&o.ta(n),0===e.Ja&&(o=e.rl(o)),(o=0!==e.Ja?e.ul(o):o).Uh(e.Ds),o.Mh(e.Ps()),e.Vf&&(o.Fa(e.mf),o.Ba(e.Df),o.Ha(e.Pf),o.Ga(e.bf),o.ja(e.Lf)),e.Ja++,o.get()},this.ul=function(t){var n,r=e.D,i={};for(n in t.Dh.tags)Object.prototype.hasOwnProperty.call(r,n)||(i[n]=t.Dh.tags[n]);t.Dh.tags=i,e.D={};for(var o=0;o=0&&(g[H.pu]=h),p>0)&&(g[H.Au]=p),t.Dh.evs||(t.Dh.evs=[]),t.Dh.evs.push(g)}}return t},this.rl=function(t){var n=e.dl();if("{}"!==JSON.stringify(n)){var r,i=Z.ll(n);for(r in t.Dh.tags)i[r]=t.Dh.tags[r];t.Dh.tags=i;var o,a={};(a[H.su]=n,n={})[H.Hs]=a,n[H.sh]=H.Bs,n[H.rh]=e.Ps(),n[H.oh]=e.Bf.Gc(),e.Ue&&(a=re.jc(e.Ue.getPHT(),0,null,-1),o=re.jc(e.Ue.getBufferLength(),0,null,-1),a>=0&&(n[H.pu]=a),o>0)&&(n[H.Au]=o),t.Dh.evs||(t.Dh.evs=[]),t.Dh.evs.push(n)}return t},this.dl=function(){var t={};if("undefined"!=typeof navigator&&navigator){if(t["c3.fp.cookie"]=void 0!==navigator.cookieEnabled&&navigator.cookieEnabled?""+navigator.cookieEnabled:"",t["c3.fp.memory"]=void 0!==navigator.deviceMemory&&navigator.deviceMemory?""+navigator.deviceMemory:"",t["c3.fp.hwConc"]=void 0!==navigator.hardwareConcurrency&&navigator.hardwareConcurrency?""+navigator.hardwareConcurrency:"",t["c3.fp.java"]=""+("function"!=typeof navigator.javaEnabled)?"false":navigator.javaEnabled(),t["c3.fp.lang"]=void 0!==navigator.language&&navigator.language?""+navigator.language:"",t["c3.fp.langs"]=void 0!==navigator.languages&&navigator.languages&&navigator.languages.length>0?""+navigator.languages.toString():"",t["c3.fp.maxTp"]=void 0!==navigator.maxTouchPoints&&navigator.maxTouchPoints?""+navigator.maxTouchPoints:"",t["c3.fp.plugins"]="",void 0!==navigator.plugins&&navigator.plugins&&navigator.plugins.length>0)for(var n=0;n0)for(var r=0;r=0?navigator.maxTouchPoints:0,void 0!==navigator.product&&navigator.product?navigator.product.length:0),e.fillStyle="rgba(102, 204, 0, 0.7)",e.fillText(t,void 0!==navigator.deviceMemory&&navigator.deviceMemory?navigator.deviceMemory:0,void 0!==navigator.hardwareConcurrency&&navigator.hardwareConcurrency?navigator.hardwareConcurrency:0),j.Rr(n.toDataURL())}return""}catch(e){return""}},this.oc=function(){var t;e.Sf||(t=e.el())&&e.El(t)},this.Qc=function(){var t;e.Pn===p.PlayerState.PLAYING&&e.Ue&&(t=e.Ue.getRenderedFrameRate())>0&&(e.wf+=t,e.If++)},this.sl=function(){return e.wf>0&&e.If>0||(this.Qc(),e.wf>0&&e.If>0)?Z._l.Cast(+e.wf/e.If):p.DEFAULT_RENDERED_FRAME_RATE},this.El=function(t){e.Zc();var n=e.Ja-1;e.p.info("postHeartbeat(): Send HB["+n+"]"+e.Jf()),e.Hf.Rl(t,(function(t,r){e.pl(t,r,n)}))},this.pl=function(t,n,r){e.Sf||e.g.F("onHeartbeatResponse",(function(){var i,o;t?n?(e.p.debug("onHeartbeatResponse(): received valid response for HB["+r+"]"),e.$c(r),(i=n[H.Lr])&&i!==(o=e.Kf.get(z.B))&&(e.p.debug("onHeartbeatResponse(): setting the client id to "+i+" (from gateway)"),e.Kf.set(z.B,i),e.Kf.Al(),o===H.H)&&i!==H.H&&e.Ee.k(),(o=n[H.Pr])&&o!==H.Dr&&e.p.error("onHeartbeatResponse(): error from gateway: "+o),"object"==typeof(i=n[H.Mr])&&((o=i[H.Vr])>=0&&e.Kf.get(z.nl)!==o&&(e.p.debug("onHeartbeatResponse(): setting Maximum Heartbeat Infos to "+o+" (from gateway)"),e.Kf.set(z.nl,o)),o=i[H.kr],(o=!!Z.ie(o)&&o)!==e.Kf.get(z.ol)&&(e.p.debug("onHeartbeatResponse(): turning "+(o?"on":"off")+" sending of logs"),e.Kf.set(z.ol,o)),o=i[H.Fr],Z.gt(o)&&(o=Z._l.Cast(o))!==e.Vi.heartbeatInterval&&(e.p.debug("onHeartbeatResponse(): received hbIntervalMs from gateway: "+o),e.Vi.heartbeatInterval=o,e.qa)&&e.uc(),(o=i[H.Br])&&o!==e.Vi.gatewayUrl&&(e.p.debug("onHeartbeatResponse(): received gatewayUrl from gateway: "+o),e.Vi.gatewayUrl=o),e.Tl()||(e.Cf={},(o=i[H.Hr])&&(e.yf||(e.yf=!0),e.p.debug("onHeartbeatResponse(): received fp from gateway: "+o),e.Cf=o.split(",")),e.Vf=i[H.Gr],Z.ie(e.Vf)&&(e.Vf?(e.p.debug("onHeartbeatResponse(): enabling the CDN Server IP collection"),e.Mf||e.hc()):e.ec())))):e.p.warning("onHeartbeatResponse(): decoded heartbeat response is null."):(Z.Pt(o=n)?Z.Sl(o,"HTTP timeout")?e.p.warning("onHeartbeatResponse(): "+o):e.p.error("onHeartbeatResponse(): failed to send heartbeat: "+o):(o=G.Ol,e.p.error("onHeartbeatResponse(): "+o)),e.zc(r,o))}))},this.Ps=function(){return Z._l.Cast(e.jf.current()-e.Ds)},this.qc=function(){return this.Bf.Gc()},this.Jf=function(){return this.ks()?" (global session)":""},this.ks=function(){return this.xf===q.Nt.Oh},this.Tl=function(){return this.xf===q.Nt.Oh&&"T"===this.nf["c3.IPV4IPV6GlobalSession"]},this.Cs=function(){return this.xf===q.Nt.Ot},this.qf=function(){return this.xf===q.Nt.Dt},this.Lt=function(t){e.Nl(t),e.Zf()},this.Nl=function(t){var n={},r={};if(Z.Pt(t.assetName)&&!e.ys.gl&&(e.Ct.assetName!==t.assetName?(e.Ct.assetName&&(n[H.iu]=e.Ct.assetName),r[H.iu]=t.assetName,e.Ct.assetName=t.assetName):e.p.warning("mergeContentMetadata(): assetName was not changed.")),Z.Pt(t.applicationName)&&(e.Ct.applicationName!==t.applicationName?(e.Ct.applicationName&&(n[H.eu]=e.Ct.applicationName),r[H.eu]=t.applicationName,e.Ct.applicationName=t.applicationName):e.p.warning("mergeContentMetadata(): applicationName was not changed.")),Z.Pt(t.streamUrl)&&!e.ys.Il&&(e.Ct.streamUrl!==t.streamUrl?(e.Ct.streamUrl&&(n[H.Tu]=e.Ct.streamUrl),r[H.Tu]=t.streamUrl,e.Ct.streamUrl=t.streamUrl,e.On=e.Ct.streamUrl):e.p.warning("mergeContentMetadata(): streamUrl was not changed.")),Z.Pt(t.viewerId)&&(e.Ct.viewerId!==t.viewerId?(e.Ct.viewerId&&(n[H.nu]=e.Ct.viewerId),r[H.nu]=t.viewerId,e.Ct.viewerId=t.viewerId):e.p.warning("mergeContentMetadata(): viewerId was not changed.")),Z.Pt(t.defaultResource)&&!e.ys.wl&&(e.Ct.defaultResource!==t.defaultResource?(e.Ct.defaultResource&&(n[H.Ru]=e.Ct.defaultResource),r[H.Ru]=t.defaultResource,e.Ct.defaultResource=t.defaultResource):e.p.warning("mergeContentMetadata(): defaultResource was not changed.")),Z.gt(t.duration)&&t.duration>0&&!e.ys.Cl&&(e.Ct.duration!==t.duration?(e.Ls>0&&(n[H.lu]=e.Ls),r[H.lu]=t.duration,e.Ct.duration=t.duration,e.Ls=e.Ct.duration):e.p.warning("mergeContentMetadata(): duration was not changed.")),Z.gt(t.encodedFrameRate)&&t.encodedFrameRate>0&&!e.ys.yl&&(e.Ct.encodedFrameRate!==t.encodedFrameRate?(e.Ct.encodedFrameRate>-1&&(n[H.du]=e.Ct.encodedFrameRate),r[H.du]=t.encodedFrameRate,e.Ct.encodedFrameRate=t.encodedFrameRate,e.wn=e.Ct.encodedFrameRate):e.p.warning("mergeContentMetadata(): encodedFrameRate was not changed.")),t.streamType!==h.StreamType.UNKNOWN&&(e.Ct.streamType!==t.streamType?(e.Ct.streamType!==h.StreamType.UNKNOWN&&(e.Ct.streamType===h.StreamType.LIVE?n[H.qr]=!0:n[H.qr]=!1),t.streamType===h.StreamType.LIVE?r[H.qr]=!0:r[H.qr]=!1,e.Ct.streamType=t.streamType):e.p.warning("mergeContentMetadata(): streamType was not changed.")),Z.Ht(t.custom)>0){var i,o={},a={};for(i in t.custom)e.Ct.custom[i]!==t.custom[i]?(o[i]=t.custom[i],e.Ct.custom[i]&&(a[i]=e.Ct.custom[i]),e.Ct.custom[i]=t.custom[i]):e.p.info("mergeContentMetadata(): custom."+i+" was not changed.");Z.Ht(o)>0?(Z.Ht(a)>0&&(n[H.su]=a),r[H.su]=o):e.p.warning("mergeContentMetadata(): custom was not changed.")}Z.Ht(r)>0&&this.lc(r,n)},this.Zf=function(){var t;e.p.debug("setStatesFromContentMetadata()"),e.Ct.defaultResource&&this.oa(e.Ct.defaultResource),e.Ct.streamUrl&&this.ma(e.Ct.streamUrl),e.Ct.duration>0&&this.ia(e.Ct.duration),e.Ct.encodedFrameRate>0&&this.ra(e.Ct.encodedFrameRate),e.Ct.streamType!==h.StreamType.UNKNOWN&&(t=e.Ct.streamType===h.StreamType.LIVE,this.Vh(t)),e.Ct.assetName&&this.xh(e.Ct.assetName),e.Ct.viewerId&&this.Yh(e.Ct.viewerId),(e.Ct.applicationName||e.Ct.playerName)&&this.qh(e.Ct.applicationName||e.Ct.playerName),Z.Ht(e.Ct.custom)>0&&this.Jh(e.Ct.custom)},this.zf=function(){var t={};if(this.ks()||(e.Ct.assetName?t[H.iu]=e.Ct.assetName:e.p.warning("enqueueEventForContentMetadata(): assetName was not set."),e.Ct.applicationName?t[H.eu]=e.Ct.applicationName:e.p.warning("enqueueEventForContentMetadata(): applicationName was not set."),e.Ct.streamUrl?t[H.Tu]=e.Ct.streamUrl:e.p.warning("enqueueEventForContentMetadata(): streamUrl was not set."),e.Ct.viewerId?t[H.nu]=e.Ct.viewerId:e.p.warning("enqueueEventForContentMetadata(): viewerId was not set."),e.Ct.defaultResource?t[H.Ru]=e.Ct.defaultResource:e.p.warning("enqueueEventForContentMetadata(): defaultResource was not set."),e.Ct.duration>-1?t[H.lu]=e.Ct.duration:e.p.warning("enqueueEventForContentMetadata(): duration was not set."),e.Ct.encodedFrameRate>-1?t[H.du]=e.Ct.encodedFrameRate:e.p.warning("enqueueEventForContentMetadata(): encodedFrameRate was not set."),e.Ct.streamType!==h.StreamType.UNKNOWN?e.Ct.streamType===h.StreamType.LIVE?t[H.qr]=!0:t[H.qr]=!1:e.p.warning("enqueueEventForContentMetadata(): streamType was not set.")),Z.Ht(e.Ct.custom)>0)for(var n in t[H.su]={},e.Ct.custom)t[H.su][n]=e.Ct.custom[n];else this.ks()||e.p.warning("enqueueEventForContentMetadata(): custom tags were not set.");Z.Ht(t)>0&&this.lc(t,null)},this.tc=function(){e.Ct&&Z.Pt(e.Ct.assetName)||e.p.warning("Missing assetName during session creation"),e.Ct&&Z.Pt(e.Ct.defaultResource)||e.p.warning("Missing resource during session creation"),e.Ct&&Z.Pt(e.Ct.streamUrl)||e.p.warning("Missing streamUrl during session creation"),(!e.Ct||e.Ct.encodedFrameRate<=0)&&e.p.warning("Missing encodedFrameRate during session creation"),e.Ct&&Z.Pt(e.Ct.viewerId)||e.p.warning("Missing viewerId during session creation"),e.Ct&&e.Ct.streamType&&h.StreamType.UNKNOWN!==e.Ct.streamType||e.p.warning("Missing streamType during session creation"),e.Ct&&Z.Pt(e.Ct.applicationName)||e.p.warning("Missing applicationName during session creation"),(!e.Ct||e.Ct.duration<=0)&&e.p.warning("Missing duration during session creation")},this.Zt=function(t,n){e.pf||(e.pf={}),e.pf[t]=n},this.$f=function(){var t={};e.Ee&&e.Ee.M&&(t[H.Iu]=e.Ee.M,e.M=e.Ee.M),e.Ee&&e.Ee.U&&(t[H.wu]=e.Ee.U,e.U=e.Ee.U),Z.Ht(t)>0&&this.lc(t,null)}}).xa=H.Sh.Ot+H.Sh.Nh+H.Sh.gh,q.Nt={Ot:"Video",Oh:"Global",Dt:"Ad"},(G=le.Session=function(){var e=this;e.Ue=null,e.C=0,e.xf=q.Nt.Ot,e.ml=!1,e.Sf=!1,e.Dl=!1,e.Pl=null,e.Re=null,e.bl=null,e.Ll=!1,e.Ml=p.PlayerState.NOT_MONITORED,e.Ul=!1,e.Vl=!1,e.kl=!1,e.yl=!1,e.Fl=!1,e.bc=!1,e.Mc=!1,e.Dc=!1,e.gl=!1,e.Il=!1,e.Bl=!1,e.Cl=!1,e.wl=!1,e.Hl=!1,function(e,t,n,r,i,o,a){this.C=e,this.xf=t,this.Kf=n,this.Gl=r,this.wt=i,this.g=o,this.p=a}.apply(e,arguments),this.Yf=function(t,n){e.wt.Yf(this),t&&e.Vt(t),e.Kf.jl()?e.Kl(n):e.Kf.Wl((function(){e.Kl(n)}))},this.cleanup=function(){e.ml=!0,e.wt.Xf(),e.Kf.jl()?e.Yl():e.Kf.Wl((function(){e.Yl()}))},this.xl=function(){(e.Cs()||e.qf())&&e.Ue&&e.ql(),e.g=null,e.Ee=null,e.Kf=null,e.Gl=null,e.wt.Tt(),e.wt=null,e.Sf=!0},this.Yl=function(){e.wt.nc(),e.xl()},this.Kl=function(t){e.wt.Qf(),e.Jl(),t?(e.bt(t.ir(),t.er()),e.wt.Xe(p.PlayerState.STOPPED),e.wt.nc(),e.xl()):e.wt.rc()},this.Jl=function(){var t,n=e.Gl.get();(t=n[se.BROWSER_NAME])&&e.wt.ca(t),(t=n[se.BROWSER_VERSION])&&e.wt.la(t),(t=n[se.DEVICE_BRAND])&&e.wt.da(t),(t=n[se.DEVICE_MANUFACTURER])&&e.wt.va(t),(t=n[se.DEVICE_MODEL])&&e.wt.Ea(t),(t=n[se.DEVICE_TYPE])&&e.wt._a(t),(t=n[se.DEVICE_VERSION])&&e.wt.Ra(t),(t=n[se.FRAMEWORK_NAME])&&e.wt.pa(t),(t=n[se.FRAMEWORK_VERSION])&&e.wt.Aa(t),(t=n[se.OPERATING_SYSTEM_NAME])&&e.wt.Ta(t),(t=n[se.OPERATING_SYSTEM_VERSION])&&e.wt.Sa(t),(t=n[se.DEVICE_CATEGORY])&&e.wt.Oa(t),(t=n[se.SCREEN_WIDTH])&&e.wt.Na(t),(t=n[se.SCREEN_HEIGHT])&&e.wt.ga(t),(t=n[se.SCALE_FACTOR])&&e.wt.Ia(t)},this.Ei=function(t){e.wt.Pn===t||(e.wt.Pn===p.PlayerState.NOT_MONITORED&&t!==p.PlayerState.NOT_MONITORED&&(e.Ml=t),e.Ll)||e.wt.Xe(t)},this._i=function(t){e.Ul||e.wt.dc(t)},this.Ri=function(t){e.Ul||e.wt.Ec(t)},this.Ii=function(t){e.Vl||e.wt.wa(t)},this.wi=function(t){e.Vl||e.wt.Co(t)},this.pi=function(t,n){!Z.gt(n)&&e.Hl&&(n=-1),e.wt.Jc(t,n)},this.qn=function(t){t>0&&(e.yl||e.wt.ra(t))},this.Qn=function(t){t>0&&(e.Cl||e.wt.ia(t))},this.Zn=function(t){e.wt.ma(t)},this.Ai=function(t){e.wt.Nc(t)},this.Ti=function(t){e.wt.Ic(t)},this.nt=function(t){e.wt.ba(t)},this.et=function(t){e.wt.La(t)},this.ni=function(t){e.wt.Us()||e.wt.pa(t)},this.ei=function(t){e.wt.Vs()||e.wt.Aa(t)},this.Oi=function(t){e.wt.ka(t)},this.oi=function(t){e.wt.Ka(t)},this.ui=function(t){e.wt.Wa(t)},this.ai=function(t){e.wt.Ya(t)},this.Si=function(t,n){e.bt(t,n)},this.Yn=function(){e.ql()},this.Wt=function(t,n,r){e.Dl||(e.Dl=!0,e.Pl=t,e.Re=n,e.bl=r,e.wt.Vc(!0),e.Pl===_.AdStream.CONTENT||e.Re===_.AdPlayer.SEPARATE?(e.wt.Pn!==p.PlayerState.NOT_MONITORED&&(e.Ml=e.wt.Pn),e.wt.Xe(p.PlayerState.NOT_MONITORED),e.Ll=!0):e.Pl===_.AdStream.SEPARATE&&e.Re===_.AdPlayer.CONTENT&&(e.wt.Pn!==p.PlayerState.NOT_MONITORED&&(e.Ml=e.wt.Pn),e.wt.Xe(p.PlayerState.NOT_MONITORED),e.Ll=!0,e.Ul=!0,e.Vl=!0,e.yl=!0,e.kl=!0,e.bc=!0,e.Mc=!0,e.Dc=!0,e.gl=!0,e.Il=!0,e.Bl=!0,e.Cl=!0,e.wl=!0,e.Hl=!0))},this.Yt=function(){e.Dl&&(e.wt.Vc(!1),e.Pl===_.AdStream.CONTENT||e.Re===_.AdPlayer.SEPARATE?e.Xl||(e.Ll=!1,e.wt.Xe(e.Ml)):e.Pl===_.AdStream.SEPARATE&&e.Re===_.AdPlayer.CONTENT&&(e.Ul=!1,e.Vl=!1,e.yl=!1,e.kl=!1,e.Fl=!1,e.Xl||(e.Ll=!1,e.wt.Xe(e.Ml)),e.bc=!1,e.Mc=!1,e.Dc=!1,e.gl=!1,e.Il=!1,e.Bl=!1,e.Cl=!1,e.wl=!1,e.Hl=!1),e.Dl=!1,e.Pl=e.Re=e.bl=null)},this.Mt=function(){e.Ue&&e.Ue&&(e.g.F("Session.detachPlayer",(function(){e.Ue.xn()})),e.Ue=null,e.wt.Wc(null),e.wt.Xe(p.PlayerState.NOT_MONITORED))},this.ql=function(){e.Ue&&(e.g.F("Session.releasePlayerStateManager",(function(){e.Ue.xn()})),e.Ue=null,e.wt.Wc(null),e.wt.Xe(p.PlayerState.NOT_MONITORED))},this.Ut=function(){e.wt.Vc(!0),e.wt.Pn!==p.PlayerState.NOT_MONITORED&&(e.Ml=e.wt.Pn),e.wt.Xe(p.PlayerState.NOT_MONITORED),e.Ll=!0},this.Vt=function(t){e.Ue||t instanceof p&&e.g.F("Session.attachPlayer()",(function(){t.setMonitoringNotifier(e,e.C)&&(t.fi(),e.Ue=t,e.wt.Wc(e.Ue))}))},this.kt=function(){e.wt.Vc(!1),e.Ul=!1,e.Vl=!1,e.Ql=!1,e.kl=!1,e.Fl=!1,e.bc=!1,e.Mc=!1,e.Dc=!1,e.gl=!1,e.Il=!1,e.Bl=!1,e.Cl=!1,e.wl=!1,e.Hl=!1,e.Xl||(e.Ll=!1,e.Ml!==p.PlayerState.NOT_MONITORED&&e.wt.Xe(e.Ml))},this.qt=function(){return e.Ue},this.Ft=function(){e.Xl||(e.Xl=!0,e.Ll=!0)},this.Bt=function(){e.Xl&&(e.Xl=!1,e.Dl||(e.Ll=!1,e.Ml!==p.PlayerState.NOT_MONITORED&&e.wt.Xe(e.Ml)))},this.bt=function(t,n){!Z.Pt(t)||n!==_.ErrorSeverity.FATAL&&n!==_.ErrorSeverity.WARNING||e.Fl||(n=n===_.ErrorSeverity.FATAL,e.wt.Fc(t,n))},this.Lt=function(t){e.g.F("Session.updateContentMetadata",(function(){e.wt.Lt(t)}))},this.Kt=function(t,n){e.wt.Xc(t,n)},this.ks=function(){return e.xf===q.Nt.Oh},this.Cs=function(){return e.xf===q.Nt.Ot},this.qf=function(){return e.xf===q.Nt.Dt},this.Jf=function(){return e.ks()?" (global session)":""},this.Xt=function(){return this.C},this.Qt=function(){return e.Kf.jl()?e.Kf.get(z.B):null},this.Zt=function(t,n){e.wt.Zt(t,n)}}).Ol="received no response (or a bad response) to heartbeat POST request",Y=le.SessionFactory=function(){var e=this;e.Fi=null,e.Zl=0,e.zl=null,function(t,n,r,i){e.Ee=t,e.Vi=n,e.Kf=r,e.T=i,e.Zl=0,e.zl={}}.apply(e,arguments),this.Tt=function(){for(var t in e.Fi=null,e.zl)e.zl[t].cleanup();e.zl=null,e.Zl=0},this.$l=function(){var t=e.Zl;return e.Zl++,t},this.St=function(t,n,r,i,o){return t||(t=new h),e.td(t,n,r,i,o)},this.Y=function(t){return e.td(t,q.Nt.Oh,void 0,d.version)},this.nd=function(){return ne.ed()},this.td=function(t,n,r,i,o){return n=e.T.Zi(e.Ee,e.Vi,e.Kf,e.nd(),n,t.ct(),i),t=e.$l(),void 0!==o&&void 0!==o.error?n.Yf(r,o.error):(e.sd(t,n),n.Yf(r)),t},this.jt=function(t){return e.zl[t]},this.It=function(e){return!(e=this.jt(e))||e.Cs()||e.qf()?e:null},this.sd=function(t,n){e.zl[t]=n},this.od=function(t){delete e.zl[t]},this.xt=function(t){var n=e.jt(t);e.od(t),n.cleanup()},this.tt=function(){return e.zl}},K=le.rd=function(e){this._e=e,this.ud=function(e,t,n){var r=!1;return this._e.createOnce((function(){r||e(!(r=!0),n+" ("+t+" ms)")}),t,"CallbackWithTimeout.wrap"),function(t,n){r||(r=!0,e(t,n))}}},(z=le.Config=function(e,t,n){var r=this;this.ad=t,this.fd=n,this.ld={clientId:H.H,iid:H.Sr,sendLogs:!1,maxHbInfos:H.Nr},this.I=Z.ll(this.ld),this.dd=!1,this.vd=!1,this.Ed=[],this.jl=function(){return this.dd},this.Et=function(){this.ad.Et(z.hd,(function(e,t){e&&r._d(t),r.dd=!0,r.Rd()}))},this._d=function(e){var t;(e=this.fd.yh(e))?e&&(t=e[z.pd],e=e[z._t],t&&t!==H.H&&""!==t&&"null"!==t&&(this.I[z.B]=t),e!==H.Sr)&&""!==e&&"null"!==e&&(this.I[z._t]=e):this.vd=!0},this.Ad=function(){var e={};return e[z.pd]=this.I.clientId,this.fd.Ch(e)},this.Al=function(){this.ad.Al(z.hd,this.Ad(),(function(e,t){}))},this.Wl=function(e){this.jl()?e():this.Ed.push(e)},this.get=function(e){return this.dd?this.I[e]:null},this.set=function(e,t){this.dd&&(this.I[e]=t)},this.Rd=function(){for(var e;void 0!==(e=this.Ed.shift());)e()},this.getClientId=function(){return this.I.clientId},this.getIid=function(){return this.I.iid}}).hd="sdkConfig",z.pd="clId",z._t="iid",z.B="clientId",z.ol="sendLogs",z.nl="maxHbInfos",z.hl="c3.fp.",z.$t={al:"0",Td:"1",tn:"2",zt:"3",fl:"4",en:"5",nn:"6"},X=le.EventQueue=function(){this.Sd=[],this.Od=0,this.Kc=function(e){this.Sd.push(e)},this.Gc=function(){var e=this.Od;return this.Od++,e},this.Wf=function(){var e=this.Sd;return this.Sd=[],e}},Q=le.ExceptionCatcher=function(e,t,n){this.Nd=t,this.N=n,this.F=function(e,t,n){try{t()}catch(t){if(n)n(t);else{if(this.N.allowUncaughtExceptions)throw t;this.gd(e,t)}}},this.gd=function(e,t){if(e="Uncaught exception: "+e+": "+t.toString(),this.Nd)try{this.Nd.Rl(e)}catch(e){}}},J=le.GatewayControl=function(e,t,n,r,i){var o=this;this.Vi=e,this.Id=n,this.fd=r,this.wd=i,this.Rl=function(e,t){var n=(this.wd?this.wd.indexOf("ipv4")>-1?this.Vi.G:this.Vi.q:this.Vi.gatewayUrl)+H.Tr;this.Id.Cd("POST",n,this.fd.Ch(e),"application/json",(function(e,n){var r;e?(r=o.fd.yh(n),t(e,r)):t(e,n)}))}},Z=le.Lang={yd:function(e){return Z.Pt(e)&&e&&"undefined"!==e&&"null"!==e},Gt:function(e){var t,n,r={};for(t in e)Z.yd(t)&&(n=e[t],Z.yd(n))&&(r[t]=n);return r},Jn:function(e,t,n){if(!e)throw new Error("Expected "+n+" implementation is null.");for(var r in t)if("function"!=typeof e[r])throw new Error("Expected method "+r+" in "+n+" implementation.")},Ht:function(e){var t,n=0;for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&n++;return n},yt:function(e){return""+e},md:function(e){return Math.floor(e)},cn:function(e){return Math.abs(Z.md(e))},Dd:function(e){return Boolean(e)},Pt:function(e){return"string"==typeof e&&""!==e},Sl:function(e,t){return"string"==typeof e&&"string"==typeof t&&"function"==typeof e.indexOf&&0===e.indexOf(t)},ie:function(e){return"boolean"==typeof e},Pd:function(e){return escape(e)},mh:function(e){return"object"==typeof e},Sc:function(e){var t,n="";for(t in e)n+=t+"="+e[t];return"Object{"+n+"}"},bd:function(e){var t,n=Z.ll(e);for(t in n)n[t]||delete n[t];return n},ll:function(e){var t,n={};for(t in e)n[t]=e[t];return n},Tc:function(e,t){if(typeof e!=typeof t)return!1;if(e instanceof Object&&t instanceof Object){if(Z.Ht(e)!==Z.Ht(t))return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}return e===t},ko:function(){for(var e={},t=0;tB.Vd?e%=B.two32:e=B.kd},F={Vd:2147483647,kd:-2147483648},Z._l=F,Z._l.Cast=function(e){return(e=parseInt(e,10))>F.Vd?e%=F.Vd:e=F.kd},Z.nr=function(){return"undefined"!=typeof window&&window&&window.location&&window.location.search?window.location.search:""},Z.Hd=function(){return document&&document.referrer?document.referrer:""},ee=le.LogBuffer=function(){this.Gd=[],this.lr=function(e){this.Gd.length>=32&&this.Gd.shift(),this.Gd.push(e)},this.Wf=function(){var e=this.Gd;return this.Gd=[],e}},(te=le.Ping=function(e,t,n,r){this.Kd=!1,this.Wd=null,this.p=e,this.p.setModuleName("Ping"),this.Id=t,this.Vi=n,this.ki=r,this.Rl=function(e){this.Kd||(this.Kd=!0,e=this.Yd()+"&d="+Z.Pd(e.toString()),this.p.error("send(): "+e),this.Id.Cd("GET",e,null,null,null),this.Kd=!1)},this.Yd=function(){if(!this.Wd){var e=te.xd+"?comp="+te.jd+"&clv="+(this.ki||_.version);if(this.Vi&&(e+="&cid="+this.Vi.customerKey),e+="&sch="+H.Cr,!this.Vi)return e;this.Wd=e}return this.Wd}}).jd="sdkjs",te.xd="https://pings.conviva.com/ping.ping",ne=le.qd={Jd:4294967295,Xd:2147483647,Qd:-2147483648,ed:function(){return Math.floor(Math.random()*ne.Jd)+ne.Qd},Rt:function(){return Math.floor(Math.random()*ne.Jd)}},re=le.Zd={jc:function(e,t,n,r){return isNaN(e)||"number"!=typeof e||e===r?r:(r=Z.md(e),re.zd(r,t,n))},zd:function(e,t,n){return Z.gt(n)&&e>n?e=n:Z.gt(t)&&e(()=>{var e={804:(e,t,n)=>{"use strict";var r=n(158),i=n(399);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}var a,s,u=n(812).codes,c=u.ERR_AMBIGUOUS_ARGUMENT,l=u.ERR_INVALID_ARG_TYPE,d=u.ERR_INVALID_ARG_VALUE,_=u.ERR_INVALID_RETURN_VALUE,f=u.ERR_MISSING_ARGS,h=n(622),p=n(19).inspect,g=n(19).types,v=g.isPromise,m=g.isRegExp,y=Object.assign?Object.assign:n(473).assign,b=Object.is?Object.is:n(884);function S(){var e=n(673);a=e.isDeepEqual,s=e.isDeepStrictEqual}new Map;var E=!1,$=e.exports=P,T={};function A(e){if(e.message instanceof Error)throw e.message;throw new h(e)}function C(e,t,n,r){if(!n){var i=!1;if(0===t)i=!0,r="No value argument passed to `assert.ok()`";else if(r instanceof Error)throw r;var o=new h({actual:n,expected:!0,message:r,operator:"==",stackStartFn:e});throw o.generatedMessage=i,o}}function P(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),i=1;i1?n-1:0),i=1;i1?n-1:0),i=1;i1?n-1:0),i=1;i{"use strict";var r=n(158);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?a(e):t}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e){var t="function"==typeof Map?new Map:void 0;return s=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return u(e,arguments,l(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,e)},s(e)}function u(e,t,n){return u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&c(i,n.prototype),i},u.apply(null,arguments)}function c(e,t){return c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},c(e,t)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}var _=n(19).inspect,f=n(812).codes.ERR_INVALID_ARG_TYPE;function h(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}var p="",g="",v="",m="",y={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function b(e){var t=Object.keys(e),n=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){n[t]=e[t]})),Object.defineProperty(n,"message",{value:e.message}),n}function S(e){return _(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var E=function(e){function t(e){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),"object"!==d(e)||null===e)throw new f("options","Object",e);var i=e.message,s=e.operator,u=e.stackStartFn,c=e.actual,_=e.expected,E=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=i)n=o(this,l(t).call(this,String(i)));else if(r.stderr&&r.stderr.isTTY&&(r.stderr&&r.stderr.getColorDepth&&1!==r.stderr.getColorDepth()?(p="",g="",m="",v=""):(p="",g="",m="",v="")),"object"===d(c)&&null!==c&&"object"===d(_)&&null!==_&&"stack"in c&&c instanceof Error&&"stack"in _&&_ instanceof Error&&(c=b(c),_=b(_)),"deepStrictEqual"===s||"strictEqual"===s)n=o(this,l(t).call(this,function(e,t,n){var i="",o="",a=0,s="",u=!1,c=S(e),l=c.split("\n"),_=S(t).split("\n"),f=0,b="";if("strictEqual"===n&&"object"===d(e)&&"object"===d(t)&&null!==e&&null!==t&&(n="strictEqualObject"),1===l.length&&1===_.length&&l[0]!==_[0]){var E=l[0].length+_[0].length;if(E<=10){if(!("object"===d(e)&&null!==e||"object"===d(t)&&null!==t||0===e&&0===t))return"".concat(y[n],"\n\n")+"".concat(l[0]," !== ").concat(_[0],"\n")}else if("strictEqualObject"!==n&&E<(r.stderr&&r.stderr.isTTY?r.stderr.columns:80)){for(;l[0][f]===_[0][f];)f++;f>2&&(b="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var n=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,n-e.length)}(" ",f),"^"),f=0)}}for(var $=l[l.length-1],T=_[_.length-1];$===T&&(f++<2?s="\n ".concat($).concat(s):i=$,l.pop(),_.pop(),0!==l.length&&0!==_.length);)$=l[l.length-1],T=_[_.length-1];var A=Math.max(l.length,_.length);if(0===A){var C=c.split("\n");if(C.length>30)for(C[26]="".concat(p,"...").concat(m);C.length>27;)C.pop();return"".concat(y.notIdentical,"\n\n").concat(C.join("\n"),"\n")}f>3&&(s="\n".concat(p,"...").concat(m).concat(s),u=!0),""!==i&&(s="\n ".concat(i).concat(s),i="");var P=0,I=y[n]+"\n".concat(g,"+ actual").concat(m," ").concat(v,"- expected").concat(m),w=" ".concat(p,"...").concat(m," Lines skipped");for(f=0;f1&&f>2&&(M>4?(o+="\n".concat(p,"...").concat(m),u=!0):M>3&&(o+="\n ".concat(_[f-2]),P++),o+="\n ".concat(_[f-1]),P++),a=f,i+="\n".concat(v,"-").concat(m," ").concat(_[f]),P++;else if(_.length1&&f>2&&(M>4?(o+="\n".concat(p,"...").concat(m),u=!0):M>3&&(o+="\n ".concat(l[f-2]),P++),o+="\n ".concat(l[f-1]),P++),a=f,o+="\n".concat(g,"+").concat(m," ").concat(l[f]),P++;else{var k=_[f],O=l[f],R=O!==k&&(!h(O,",")||O.slice(0,-1)!==k);R&&h(k,",")&&k.slice(0,-1)===O&&(R=!1,O+=","),R?(M>1&&f>2&&(M>4?(o+="\n".concat(p,"...").concat(m),u=!0):M>3&&(o+="\n ".concat(l[f-2]),P++),o+="\n ".concat(l[f-1]),P++),a=f,o+="\n".concat(g,"+").concat(m," ").concat(O),i+="\n".concat(v,"-").concat(m," ").concat(k),P+=2):(o+=i,i="",1!==M&&0!==f||(o+="\n ".concat(O),P++))}if(P>20&&f30)for(T[26]="".concat(p,"...").concat(m);T.length>27;)T.pop();n=1===T.length?o(this,l(t).call(this,"".concat($," ").concat(T[0]))):o(this,l(t).call(this,"".concat($,"\n\n").concat(T.join("\n"),"\n")))}else{var A=S(c),C="",P=y[s];"notDeepEqual"===s||"notEqual"===s?(A="".concat(y[s],"\n\n").concat(A)).length>1024&&(A="".concat(A.slice(0,1021),"...")):(C="".concat(S(_)),A.length>512&&(A="".concat(A.slice(0,509),"...")),C.length>512&&(C="".concat(C.slice(0,509),"...")),"deepEqual"===s||"equal"===s?A="".concat(P,"\n\n").concat(A,"\n\nshould equal\n\n"):C=" ".concat(s," ").concat(C)),n=o(this,l(t).call(this,"".concat(A).concat(C)))}return Error.stackTraceLimit=E,n.generatedMessage=!i,Object.defineProperty(a(n),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),n.code="ERR_ASSERTION",n.actual=c,n.expected=_,n.operator=s,Error.captureStackTrace&&Error.captureStackTrace(a(n),u),n.stack,n.name="AssertionError",o(n)}var n,s;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(t,e),n=t,s=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:_.custom,value:function(e,t){return _(this,function(e){for(var t=1;t{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}function o(e,t){return o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},o(e,t)}var a,s,u={};function c(e,t,n){n||(n=Error);var a=function(n){function a(n,o,s){var u,c;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),c=i(a).call(this,function(e,n,r){return"string"==typeof t?t:t(e,n,r)}(n,o,s)),u=!c||"object"!==r(c)&&"function"!=typeof c?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this):c,u.code=e,u}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(a,n),a}(n);u[e]=a}function l(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}c("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),c("ERR_INVALID_ARG_TYPE",(function(e,t,i){var o,s,u,c;if(void 0===a&&(a=n(804)),a("string"==typeof e,"'name' must be a string"),"string"==typeof t&&"not "===t.substr(0,4)?(o="must not be",t=t.replace(/^not /,"")):o="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length)," argument"===e.substring(n-9,n)}(e))s="The ".concat(e," ").concat(o," ").concat(l(t,"type"));else{var d=("number"!=typeof c&&(c=0),c+1>(u=e).length||-1===u.indexOf(".",c)?"argument":"property");s='The "'.concat(e,'" ').concat(d," ").concat(o," ").concat(l(t,"type"))}return s+". Received type ".concat(r(i))}),TypeError),c("ERR_INVALID_ARG_VALUE",(function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===s&&(s=n(19));var i=s.inspect(t);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(i)}),TypeError,RangeError),c("ERR_INVALID_RETURN_VALUE",(function(e,t,n){var i;return i=n&&n.constructor&&n.constructor.name?"instance of ".concat(n.constructor.name):"type ".concat(r(n)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(i,".")}),TypeError),c("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),r=0;r0,"At least one arg needs to be specified");var i="The ",o=t.length;switch(t=t.map((function(e){return'"'.concat(e,'"')})),o){case 1:i+="".concat(t[0]," argument");break;case 2:i+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:i+=t.slice(0,o-1).join(", "),i+=", and ".concat(t[o-1]," arguments")}return"".concat(i," must be specified")}),TypeError),e.exports.codes=u},673:(e,t,n)=>{"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var o=void 0!==/a/g.flags,a=function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t},s=function(e){var t=[];return e.forEach((function(e,n){return t.push([n,e])})),t},u=Object.is?Object.is:n(884),c=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},l=Number.isNaN?Number.isNaN:n(396);function d(e){return e.call.bind(e)}var _=d(Object.prototype.hasOwnProperty),f=d(Object.prototype.propertyIsEnumerable),h=d(Object.prototype.toString),p=n(19).types,g=p.isAnyArrayBuffer,v=p.isArrayBufferView,m=p.isDate,y=p.isMap,b=p.isRegExp,S=p.isSet,E=p.isNativeError,$=p.isBoxedPrimitive,T=p.isNumberObject,A=p.isStringObject,C=p.isBooleanObject,P=p.isBigIntObject,I=p.isSymbolObject,w=p.isFloat32Array,M=p.isFloat64Array;function k(e){if(0===e.length||e.length>10)return!0;for(var t=0;t57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function O(e){return Object.keys(e).filter(k).concat(c(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function R(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i{"use strict";var r=n(528),i=n(235),o=i(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&o(e,".prototype.")>-1?i(n):n}},235:(e,t,n)=>{"use strict";var r=n(156),i=n(528),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),s=i("%Reflect.apply%",!0)||r.call(a,o),u=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),l=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function(e){var t=s(r,a,arguments);return u&&c&&u(t,"length").configurable&&c(t,"length",{value:1+l(0,e.length-(arguments.length-1))}),t};var d=function(){return s(r,o,arguments)};c?c(e.exports,"apply",{value:d}):e.exports.apply=d},399:(e,t,n)=>{var r=n(19),i=n(804);function o(){return(new Date).getTime()}var a,s=Array.prototype.slice,u={};a=void 0!==n.g&&n.g.console?n.g.console:"undefined"!=typeof window&&window.console?window.console:{};for(var c=[[function(){},"log"],[function(){a.log.apply(a,arguments)},"info"],[function(){a.log.apply(a,arguments)},"warn"],[function(){a.warn.apply(a,arguments)},"error"],[function(e){u[e]=o()},"time"],[function(e){var t=u[e];if(!t)throw new Error("No such label: "+e);delete u[e];var n=o()-t;a.log(e+": "+n+"ms")},"timeEnd"],[function(){var e=new Error;e.name="Trace",e.message=r.format.apply(null,arguments),a.error(e.stack)},"trace"],[function(e){a.log(r.inspect(e)+"\n")},"dir"],[function(e){if(!e){var t=s.call(arguments,1);i.ok(!1,r.format.apply(null,t))}},"assert"]],l=0;l{"use strict";var r=n(438),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,a=Array.prototype.concat,s=Object.defineProperty,u=n(320)(),c=s&&u,l=function(e,t,n,r){if(t in e)if(!0===r){if(e[t]===n)return}else if("function"!=typeof(i=r)||"[object Function]"!==o.call(i)||!r())return;var i;c?s(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n},d=function(e,t){var n=arguments.length>2?arguments[2]:{},o=r(t);i&&(o=a.call(o,Object.getOwnPropertySymbols(t)));for(var s=0;s{"use strict";function t(e,t){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var n=Object(e),r=1;r{"use strict";var r=n(765),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){if(!r(t))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=n),"[object Array]"===i.call(e)?function(e,t,n){for(var r=0,i=e.length;r{"use strict";var t=Array.prototype.slice,n=Object.prototype.toString;e.exports=function(e){var r=this;if("function"!=typeof r||"[object Function]"!==n.call(r))throw new TypeError("Function.prototype.bind called on incompatible "+r);for(var i,o=t.call(arguments,1),a=Math.max(0,r.length-o.length),s=[],u=0;u{"use strict";var r=n(521);e.exports=Function.prototype.bind||r},528:(e,t,n)=>{"use strict";var r,i=SyntaxError,o=Function,a=TypeError,s=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(e){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(e){u=null}var c=function(){throw new a},l=u?function(){try{return c}catch(e){try{return u(arguments,"callee").get}catch(e){return c}}}():c,d=n(465)(),_=n(209)(),f=Object.getPrototypeOf||(_?function(e){return e.__proto__}:null),h={},p="undefined"!=typeof Uint8Array&&f?f(Uint8Array):r,g={"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":d&&f?f([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":h,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":d&&f?f(f([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&d&&f?f((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&d&&f?f((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":d&&f?f(""[Symbol.iterator]()):r,"%Symbol%":d?Symbol:r,"%SyntaxError%":i,"%ThrowTypeError%":l,"%TypedArray%":p,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(f)try{null.error}catch(e){var v=f(f(e));g["%Error.prototype%"]=v}var m=function e(t){var n;if("%AsyncFunction%"===t)n=s("async function () {}");else if("%GeneratorFunction%"===t)n=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=s("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&f&&(n=f(i.prototype))}return g[t]=n,n},y={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},b=n(156),S=n(776),E=b.call(Function.call,Array.prototype.concat),$=b.call(Function.apply,Array.prototype.splice),T=b.call(Function.call,String.prototype.replace),A=b.call(Function.call,String.prototype.slice),C=b.call(Function.call,RegExp.prototype.exec),P=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,I=/\\(\\)?/g,w=function(e,t){var n,r=e;if(S(y,r)&&(r="%"+(n=y[r])[0]+"%"),S(g,r)){var o=g[r];if(o===h&&(o=m(r)),void 0===o&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===C(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=A(e,0,1),n=A(e,-1);if("%"===t&&"%"!==n)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var r=[];return T(e,P,(function(e,t,n,i){r[r.length]=n?T(i,I,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",o=w("%"+r+"%",t),s=o.name,c=o.value,l=!1,d=o.alias;d&&(r=d[0],$(n,E([0,1],d)));for(var _=1,f=!0;_=n.length){var m=u(c,h);c=(f=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:c[h]}else f=S(c,h),c=c[h];f&&!l&&(g[s]=c)}}return c}},455:(e,t,n)=>{"use strict";var r=n(528)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(e){r=null}e.exports=r},320:(e,t,n)=>{"use strict";var r=n(528)("%Object.defineProperty%",!0),i=function(){if(r)try{return r({},"a",{value:1}),!0}catch(e){return!1}return!1};i.hasArrayLengthDefineBug=function(){if(!i())return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=i},209:e=>{"use strict";var t={foo:{}},n=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof n)}},465:(e,t,n)=>{"use strict";var r="undefined"!=typeof Symbol&&Symbol,i=n(73);e.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&i()}},73:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},686:(e,t,n)=>{"use strict";var r=n(73);e.exports=function(){return r()&&!!Symbol.toStringTag}},776:(e,t,n)=>{"use strict";var r=n(156);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},111:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},43:(e,t,n)=>{"use strict";var r=n(686)(),i=n(737)("Object.prototype.toString"),o=function(e){return!(r&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===i(e)},a=function(e){return!!o(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==i(e)&&"[object Function]"===i(e.callee)},s=function(){return o(arguments)}();o.isLegacyArguments=a,e.exports=s?o:a},765:e=>{"use strict";var t,n,r=Function.prototype.toString,i="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof i&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},i((function(){throw 42}),null,t)}catch(e){e!==n&&(i=null)}else i=null;var o=/^\s*class\b/,a=function(e){try{var t=r.call(e);return o.test(t)}catch(e){return!1}},s=function(e){try{return!a(e)&&(r.call(e),!0)}catch(e){return!1}},u=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),d=function(){return!1};if("object"==typeof document){var _=document.all;u.call(_)===u.call(document.all)&&(d=function(e){if((l||!e)&&(void 0===e||"object"==typeof e))try{var t=u.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=i?function(e){if(d(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{i(e,null,t)}catch(e){if(e!==n)return!1}return!a(e)&&s(e)}:function(e){if(d(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(c)return s(e);if(a(e))return!1;var t=u.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&s(e)}},936:(e,t,n)=>{"use strict";var r,i=Object.prototype.toString,o=Function.prototype.toString,a=/^\s*(?:function)?\*/,s=n(686)(),u=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(a.test(o.call(e)))return!0;if(!s)return"[object GeneratorFunction]"===i.call(e);if(!u)return!1;if(void 0===r){var t=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(e){}}();r=!!t&&u(t)}return u(e)===r}},387:e=>{"use strict";e.exports=function(e){return e!=e}},396:(e,t,n)=>{"use strict";var r=n(235),i=n(506),o=n(387),a=n(956),s=n(386),u=r(a(),Number);i(u,{getPolyfill:a,implementation:o,shim:s}),e.exports=u},956:(e,t,n)=>{"use strict";var r=n(387);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:r}},386:(e,t,n)=>{"use strict";var r=n(506),i=n(956);e.exports=function(){var e=i();return r(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},421:(e,t,n)=>{"use strict";var r=n(25),i=n(206),o=n(737),a=o("Object.prototype.toString"),s=n(686)(),u=n(455),c="undefined"==typeof globalThis?n.g:globalThis,l=i(),d=o("Array.prototype.indexOf",!0)||function(e,t){for(var n=0;n-1}return!!u&&function(e){var t=!1;return r(f,(function(n,r){if(!t)try{t=n.call(e)===r}catch(e){}})),t}(e)}},220:e=>{"use strict";var t=function(e){return e!=e};e.exports=function(e,n){return 0===e&&0===n?1/e==1/n:e===n||!(!t(e)||!t(n))}},884:(e,t,n)=>{"use strict";var r=n(506),i=n(235),o=n(220),a=n(453),s=n(789),u=i(a(),Object);r(u,{getPolyfill:a,implementation:o,shim:s}),e.exports=u},453:(e,t,n)=>{"use strict";var r=n(220);e.exports=function(){return"function"==typeof Object.is?Object.is:r}},789:(e,t,n)=>{"use strict";var r=n(453),i=n(506);e.exports=function(){var e=r();return i(Object,{is:e},{is:function(){return Object.is!==e}}),e}},113:(e,t,n)=>{"use strict";var r;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=n(441),s=Object.prototype.propertyIsEnumerable,u=!s.call({toString:null},"toString"),c=s.call((function(){}),"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=function(e){var t=e.constructor;return t&&t.prototype===e},_={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!_["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{d(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();r=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===o.call(e),r=a(e),s=t&&"[object String]"===o.call(e),_=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var h=c&&n;if(s&&e.length>0&&!i.call(e,0))for(var p=0;p0)for(var g=0;g{"use strict";var r=Array.prototype.slice,i=n(441),o=Object.keys,a=o?function(e){return o(e)}:n(113),s=Object.keys;a.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return i(e)?s(r.call(e)):s(e)})}else Object.keys=a;return Object.keys||a},e.exports=a},441:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var n=t.call(e),r="[object Arguments]"===n;return r||(r="[object Array]"!==n&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),r}},158:e=>{var t,n,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var s,u=[],c=!1,l=-1;function d(){c&&s&&(c=!1,s.length?u=s.concat(u):l=-1,u.length&&_())}function _(){if(!c){var e=a(d);c=!0;for(var t=u.length;t;){for(s=u,u=[];++l1)for(var n=1;n0?2===s.length?typeof s[1]==a?this[s[0]]=s[1].call(this,l):this[s[0]]=s[1]:3===s.length?typeof s[1]!==a||s[1].exec&&s[1].test?this[s[0]]=l?l.replace(s[1],s[2]):o:this[s[0]]=l?s[1].call(this,l,s[2]):o:4===s.length&&(this[s[0]]=l?s[3].call(this,l.replace(s[1],s[2])):o):this[s]=l||o;d+=2}},z=function(e,t){for(var n in t)if(typeof t[n]===u&&t[n].length>0){for(var r=0;r2&&(e[d]="iPad",e[f]=y),e},this.getEngine=function(){var e={};return e[_]=o,e[p]=o,K.call(e,r,b.engine),e},this.getOS=function(){var e={};return e[_]=o,e[p]=o,K.call(e,r,b.os),S&&!e[_]&&v&&"Unknown"!=v.platform&&(e[_]=v.platform.replace(/chrome os/i,H).replace(/macos/i,V)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(e){return r=typeof e===c&&e.length>350?Y(e,350):e,this},this.setUA(r),this};J.VERSION="0.7.35",J.BROWSER=W([_,p,l]),J.CPU=W([g]),J.DEVICE=W([d,h,f,v,m,b,y,S,E]),J.ENGINE=J.OS=W([_,p]),typeof t!==s?(e.exports&&(t=e.exports=J),t.UAParser=J):n.amdO?(r=function(){return J}.call(t,n,t,e))===o||(e.exports=r):typeof i!==s&&(i.UAParser=J);var Z=typeof i!==s&&(i.jQuery||i.Zepto);if(Z&&!Z.ua){var ee=new J;Z.ua=ee.getResult(),Z.ua.get=function(){return ee.getUA()},Z.ua.set=function(e){ee.setUA(e);var t=ee.getResult();for(var n in t)Z.ua[n]=t[n]}}}("object"==typeof window?window:this)},502:e=>{e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},268:(e,t,n)=>{"use strict";var r=n(43),i=n(936),o=n(154),a=n(421);function s(e){return e.call.bind(e)}var u="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,l=s(Object.prototype.toString),d=s(Number.prototype.valueOf),_=s(String.prototype.valueOf),f=s(Boolean.prototype.valueOf);if(u)var h=s(BigInt.prototype.valueOf);if(c)var p=s(Symbol.prototype.valueOf);function g(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function v(e){return"[object Map]"===l(e)}function m(e){return"[object Set]"===l(e)}function y(e){return"[object WeakMap]"===l(e)}function b(e){return"[object WeakSet]"===l(e)}function S(e){return"[object ArrayBuffer]"===l(e)}function E(e){return"undefined"!=typeof ArrayBuffer&&(S.working?S(e):e instanceof ArrayBuffer)}function $(e){return"[object DataView]"===l(e)}function T(e){return"undefined"!=typeof DataView&&($.working?$(e):e instanceof DataView)}t.isArgumentsObject=r,t.isGeneratorFunction=i,t.isTypedArray=a,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):a(e)||T(e)},t.isUint8Array=function(e){return"Uint8Array"===o(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===o(e)},t.isUint16Array=function(e){return"Uint16Array"===o(e)},t.isUint32Array=function(e){return"Uint32Array"===o(e)},t.isInt8Array=function(e){return"Int8Array"===o(e)},t.isInt16Array=function(e){return"Int16Array"===o(e)},t.isInt32Array=function(e){return"Int32Array"===o(e)},t.isFloat32Array=function(e){return"Float32Array"===o(e)},t.isFloat64Array=function(e){return"Float64Array"===o(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===o(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===o(e)},v.working="undefined"!=typeof Map&&v(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(v.working?v(e):e instanceof Map)},m.working="undefined"!=typeof Set&&m(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(m.working?m(e):e instanceof Set)},y.working="undefined"!=typeof WeakMap&&y(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(y.working?y(e):e instanceof WeakMap)},b.working="undefined"!=typeof WeakSet&&b(new WeakSet),t.isWeakSet=function(e){return b(e)},S.working="undefined"!=typeof ArrayBuffer&&S(new ArrayBuffer),t.isArrayBuffer=E,$.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&$(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=T;var A="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function C(e){return"[object SharedArrayBuffer]"===l(e)}function P(e){return void 0!==A&&(void 0===C.working&&(C.working=C(new A)),C.working?C(e):e instanceof A)}function I(e){return g(e,d)}function w(e){return g(e,_)}function M(e){return g(e,f)}function k(e){return u&&g(e,h)}function O(e){return c&&g(e,p)}t.isSharedArrayBuffer=P,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===l(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===l(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===l(e)},t.isGeneratorObject=function(e){return"[object Generator]"===l(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===l(e)},t.isNumberObject=I,t.isStringObject=w,t.isBooleanObject=M,t.isBigIntObject=k,t.isSymbolObject=O,t.isBoxedPrimitive=function(e){return I(e)||w(e)||M(e)||k(e)||O(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(E(e)||P(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))},19:(e,t,n)=>{var r=n(158),i=n(399),o=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),s=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),v(n)?r.showHidden=n:n&&t._extend(r,n),S(r.showHidden)&&(r.showHidden=!1),S(r.depth)&&(r.depth=2),S(r.colors)&&(r.colors=!1),S(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=d),f(r,e,r.depth)}function d(e,t){var n=l.styles[t];return n?"["+l.colors[n][0]+"m"+e+"["+l.colors[n][1]+"m":e}function _(e,t){return e}function f(e,n,r){if(e.customInspect&&n&&C(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return b(i)||(i=f(e,i,r)),i}var o=function(e,t){if(S(t))return e.stylize("undefined","undefined");if(b(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return y(t)?e.stylize(""+t,"number"):v(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,n);if(o)return o;var a=Object.keys(n),s=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),A(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return h(n);if(0===a.length){if(C(n)){var u=n.name?": "+n.name:"";return e.stylize("[Function"+u+"]","special")}if(E(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(T(n))return e.stylize(Date.prototype.toString.call(n),"date");if(A(n))return h(n)}var c,l="",d=!1,_=["{","}"];return g(n)&&(d=!0,_=["[","]"]),C(n)&&(l=" [Function"+(n.name?": "+n.name:"")+"]"),E(n)&&(l=" "+RegExp.prototype.toString.call(n)),T(n)&&(l=" "+Date.prototype.toUTCString.call(n)),A(n)&&(l=" "+h(n)),0!==a.length||d&&0!=n.length?r<0?E(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),c=d?function(e,t,n,r,i){for(var o=[],a=0,s=t.length;a60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(c,l,_)):_[0]+l+_[1]}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),M(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=m(n)?f(e,u.value,null):f(e,u.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),S(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function g(e){return Array.isArray(e)}function v(e){return"boolean"==typeof e}function m(e){return null===e}function y(e){return"number"==typeof e}function b(e){return"string"==typeof e}function S(e){return void 0===e}function E(e){return $(e)&&"[object RegExp]"===P(e)}function $(e){return"object"==typeof e&&null!==e}function T(e){return $(e)&&"[object Date]"===P(e)}function A(e){return $(e)&&("[object Error]"===P(e)||e instanceof Error)}function C(e){return"function"==typeof e}function P(e){return Object.prototype.toString.call(e)}function I(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!s[e])if(u.test(e)){var n=r.pid;s[e]=function(){var r=t.format.apply(t,arguments);i.error("%s %d: %s",e,n,r)}}else s[e]=function(){};return s[e]},t.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=n(268),t.isArray=g,t.isBoolean=v,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=y,t.isString=b,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=S,t.isRegExp=E,t.types.isRegExp=E,t.isObject=$,t.isDate=T,t.types.isDate=T,t.isError=A,t.types.isNativeError=A,t.isFunction=C,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(502);var w=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function M(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;i.log("%s - %s",(n=[I((e=new Date).getHours()),I(e.getMinutes()),I(e.getSeconds())].join(":"),[e.getDate(),w[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(111),t._extend=function(e,t){if(!t||!$(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var k="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function O(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(k&&e[k]){var t;if("function"!=typeof(t=e[k]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,k,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise((function(e,r){t=e,n=r})),i=[],o=0;o{"use strict";var r=n(25),i=n(206),o=n(737),a=n(455),s=o("Object.prototype.toString"),u=n(686)(),c="undefined"==typeof globalThis?n.g:globalThis,l=i(),d=o("String.prototype.slice"),_={},f=Object.getPrototypeOf;u&&a&&f&&r(l,(function(e){if("function"==typeof c[e]){var t=new c[e];if(Symbol.toStringTag in t){var n=f(t),r=a(n,Symbol.toStringTag);if(!r){var i=f(n);r=a(i,Symbol.toStringTag)}_[e]=r.get}}}));var h=n(421);e.exports=function(e){return!!h(e)&&(u&&Symbol.toStringTag in e?function(e){var t=!1;return r(_,(function(n,r){if(!t)try{var i=n.call(e);i===r&&(t=i)}catch(e){}})),t}(e):d(s(e),8,-1))}},206:(e,t,n)=>{"use strict";var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],i="undefined"==typeof globalThis?n.g:globalThis;e.exports=function(){for(var e=[],t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r);class e{constructor(e,t=void 0){this.delegate=e,this.namespace=t?`${t}$`:t}withNamespace(t){if(!t)throw new Error("Cannot create child storage instance without a valid namespace");return new e(this.delegate,this.namespace?`${this.namespace}${t}`:t)}get(e){return this.delegate.get(this.namespace,e)}set(e,t){return this.delegate.set(this.namespace,e,String(t))}getAll(e){return this.delegate.getAll(this.namespace,e)}setAll(e){return Object.keys(e).map((function(t,n){e[t]=String(e[t])})),this.delegate.setAll(this.namespace,e)}setAndForget(e,t){return this.delegate.setAndForget(this.namespace,e,t)}clear(){return this.delegate.clear(this.namespace)}}var t=n(399);let i=!0;const o=e=>(...n)=>i&&t[e](...n),a=()=>{i=!1};a();const s={debug:o("debug"),info:o("info"),warn:o("warn"),error:o("error"),enable:()=>{i=!0},disable:a,abbreviate:(e,t=500)=>e.length>t-3?`${e.slice(0,t-3)}...`:e},u={};class c{constructor(t){this.targetPlatform=t,this.getConnectionInfo=t.getConnectionInfo,this.localStorage=new e(t.localStorage),this.log=s}getPlatformInfo(){return e="platformInfo",t=this.targetPlatform.getPlatformInfo,void 0===u[e]&&(u[e]=t()),u[e];var e,t}getConnectionInfo(){return this.targetPlatform.getConnectionInfo()}}var l=n(423);const d=new(n.n(l)())(window.navigator.userAgent).getResult(),_=(()=>{const e=screen.width,t=screen.height;return{longDimension:e,shortDimension:t,dpi:0,token:`${e}x${t}@0`}})(),f={hardwareManufacturer:"unknown",hardwareModel:d.os.name,hardwareVersion:d.os.version,softwarePlatform:d.browser.name,softwareVersion:d.browser.version,mobileCarrier:"unknown",isEmulator:!1,displayParameters:_,locale:"unknown",securityMode:"unknown"},h=(()=>{const e="nexus-web-application-identifier";let t=(n=e,document.cookie.replace(new RegExp(`(?:(?:^|.*;\\s*)${n}\\s*\\=\\s*([^;]*).*$)|^.*$`),"$1"));var n;if(t){const e=t.split("|");return{id:e[0],timestamp:e[1]}}const r={id:(i=(new Date).getTime(),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=(i+16*Math.random())%16|0;return i=Math.floor(i/16),("x"==e?t:3&t|8).toString(16)}))),timestamp:Date.now().toString()};var i;return document.cookie=`${e}=${r.id}|${r.timestamp};path=/;max-age=2147483647`,r})(),p={applicationIdentifier:h.id,identifierSetTimestamp:h.timestamp},g={nexusTarget:"web",nexusVariant:"web",nexusVersion:"2.2.27",inProduction:!1};class v{enable(){s.enable()}disable(){s.disable()}enableJSNativeLogging(){}disableJSNativeLogging(){}}const m=(e,t)=>e?`${e}_${t}`:t;n.g.NexusPlatform=new c(new class{getPlatformInfo(){return Promise.resolve({device:f,application:p,nexus:g})}getConnectionInfo(){return function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;let t="unknown",n="unknown";return e&&(t="string"==typeof e.effectiveType?e.effectiveType:t,n="number"==typeof e.downlink?1e6*e.downlink:n),Promise.resolve({connectionType:t,bandwidthBps:n,isConnectionMetered:null})}()}constructor(e){this.localStorage=e,this.log=new v}}(new class{constructor(e){this._localStorage=e}_getItem(e,t){return this._localStorage.getItem(m(e,t))}_setItem(e,t,n){this._localStorage.setItem(m(e,t),n)}_removeItem(e,t){this._localStorage.removeItem(m(e,t))}_setAndForgetSync(e,t,n){this._setItem(e,t,n)}_setSync(e,t,n){const r=this._getItem(e,t);return this._setAndForgetSync(e,t,n),r}_clear(e){for(var t in this._localStorage)t.startsWith(e)&&this._localStorage.removeItem(t)}get(e,t){return new Promise((n=>n(this._getItem(e,t))))}setAndForget(e,t,n){try{this._setAndForgetSync(e,t,n)}catch(n){s.error(`Failed to setAndForget() property ${m(e,t)}`,n)}}set(e,t,n){return new Promise((r=>r(this._setSync(e,t,n))))}getAll(e,t){return new Promise((n=>{const r={};for(var i of t)r[i]=this._getItem(e,i);n(r)}))}setAll(e,t){return new Promise((n=>{const r={};for(var i in t)r[i]=this._setSync(e,i,t[i]);n(r)}))}clear(e){return new Promise((t=>{this._clear(e),t()}))}}(localStorage))),n.g.Origin=n.g.NexusPlatform,"undefined"!=typeof localStorage&&(n.g.localAsyncStorage=c.localStorage)})(),r})(),e.exports=t()},17306:(e,t,n)=>{e=n.nmd(e);var r,i=n(23716);n.g,r=()=>(()=>{var r={8404:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Left:()=>u,Right:()=>c,URI:()=>s,alt:()=>V,ap:()=>W,apFirst:()=>q,apSecond:()=>G,bimap:()=>Y,chain:()=>K,chainFirst:()=>z,duplicate:()=>X,either:()=>D,elem:()=>U,extend:()=>Q,filterOrElse:()=>oe,flatten:()=>J,fold:()=>L,foldMap:()=>Z,fromNullable:()=>b,fromOption:()=>y,fromOptionL:()=>ae,fromPredicate:()=>ie,fromRefinement:()=>m,fromValidation:()=>T,getApplyMonoid:()=>p,getApplySemigroup:()=>h,getCompactable:()=>P,getEq:()=>_,getFilterable:()=>I,getOrElse:()=>N,getSemigroup:()=>f,getSetoid:()=>d,getShow:()=>l,getValidation:()=>B,getValidationMonoid:()=>j,getValidationSemigroup:()=>F,getWitherable:()=>w,isLeft:()=>A,isRight:()=>C,left:()=>g,map:()=>ee,mapLeft:()=>te,orElse:()=>x,parseJSON:()=>M,reduce:()=>ne,reduceRight:()=>re,right:()=>v,stringifyJSON:()=>k,toError:()=>S,tryCatch:()=>E,tryCatch2v:()=>$});var r=n(7050),i=n(3975),o=n(327),a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{"use strict";n.d(t,{f7:()=>i,lr:()=>s,vD:()=>u,yv:()=>a});var r=n(327);function i(e){return{equals:function(t,n){return t===n||e(t,n)}}}var o={equals:function(e,t){return e===t}},a=o,s=o,u=o,c={URI:"Eq",contramap:function(e,t){return i((function(n,r){return e.equals(t(n),t(r))}))}};(0,r.pipeable)(c).contramap,c.contramap(s,(function(e){return e.valueOf()}))},566:(e,t,n)=>{"use strict";n.r(t),n.d(t,{None:()=>f,Some:()=>p,URI:()=>_,alt:()=>G,ap:()=>Y,apFirst:()=>K,apSecond:()=>z,chain:()=>X,chainFirst:()=>Q,compact:()=>ce,duplicate:()=>J,elem:()=>H,exists:()=>V,extend:()=>Z,filter:()=>ee,filterMap:()=>te,flatten:()=>ne,fold:()=>U,foldMap:()=>re,fromEither:()=>w,fromNullable:()=>C,fromPredicate:()=>P,fromRefinement:()=>O,getApplyMonoid:()=>E,getApplySemigroup:()=>S,getEq:()=>m,getFirstMonoid:()=>$,getLastMonoid:()=>T,getLeft:()=>x,getMonoid:()=>A,getOrElse:()=>j,getOrd:()=>y,getRefinement:()=>R,getRight:()=>N,getSetoid:()=>v,getShow:()=>g,isNone:()=>k,isSome:()=>M,map:()=>ie,mapNullable:()=>W,none:()=>h,option:()=>L,partition:()=>oe,partitionMap:()=>ae,reduce:()=>se,reduceRight:()=>ue,separate:()=>le,some:()=>b,toNullable:()=>B,toUndefined:()=>F,tryCatch:()=>I});var r=n(7050),i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt?1:0},u=(a({},o.yv,{compare:s}),a({},o.lr,{compare:s})),c=(a({},o.vD,{compare:s}),function(e){var t=function(t,n){return t===n?0:e(t,n)};return{equals:function(e,n){return 0===t(e,n)},compare:t}});!function(){for(var e=[],t=0;t{"use strict";n.d(t,{BB:()=>a,on:()=>i,yR:()=>r,zo:()=>o});var r=function(e){return e},i=function(e){return function(t){return function(n,r){return e(t(n),t(r))}}},o=function(e,t){var n=e.length;if(0===n)return t;var r=t.length;if(0===r)return e;for(var i=Array(n+r),o=0;o";var t;if(null==e)return String(e);if("function"==typeof e.toString&&e.toString!==Object.prototype.toString)return e.toString();try{return JSON.stringify(e,null,2)}catch(t){return String(e)}}},327:(e,t,n)=>{"use strict";n.r(t),n.d(t,{pipe:()=>i,pipeable:()=>S});var r=n(7050);function i(e,t,n,r,i,o,a,s,u,c){switch(arguments.length){case 1:return e;case 2:return t(e);case 3:return n(t(e));case 4:return r(n(t(e)));case 5:return i(r(n(t(e))));case 6:return o(i(r(n(t(e)))));case 7:return a(o(i(r(n(t(e))))));case 8:return s(a(o(i(r(n(t(e)))))));case 9:return u(s(a(o(i(r(n(t(e))))))));case 10:return c(u(s(a(o(i(r(n(t(e)))))))))}}var o=function(e){return"function"==typeof e.map},a=function(e){return"function"==typeof e.contramap},s=function(e){return"function"==typeof e.mapWithIndex},u=function(e){return"function"==typeof e.ap},c=function(e){return"function"==typeof e.chain},l=function(e){return"function"==typeof e.bimap},d=function(e){return"function"==typeof e.extend},_=function(e){return"function"==typeof e.reduce},f=function(e){return"function"==typeof e.reduceWithIndex},h=function(e){return"function"==typeof e.alt},p=function(e){return"function"==typeof e.compact},g=function(e){return"function"==typeof e.filter},v=function(e){return"function"==typeof e.filterWithIndex},m=function(e){return"function"==typeof e.promap},y=function(e){return"function"==typeof e.compose},b=function(e){return"function"==typeof e.throwError};function S(e){var t={};return o(e)&&(t.map=function(t){return function(n){return e.map(n,t)}}),a(e)&&(t.contramap=function(t){return function(n){return e.contramap(n,t)}}),s(e)&&(t.mapWithIndex=function(t){return function(n){return e.mapWithIndex(n,t)}}),u(e)&&(t.ap=function(t){return function(n){return e.ap(n,t)}},t.apFirst=function(t){return function(n){return e.ap(e.map(n,(function(e){return function(){return e}})),t)}},t.apSecond=function(t){return function(n){return e.ap(e.map(n,(function(){return function(e){return e}})),t)}}),c(e)&&(t.chain=function(t){return function(n){return e.chain(n,t)}},t.chainFirst=function(t){return function(n){return e.chain(n,(function(n){return e.map(t(n),(function(){return n}))}))}},t.flatten=function(t){return e.chain(t,r.yR)}),l(e)&&(t.bimap=function(t,n){return function(r){return e.bimap(r,t,n)}},t.mapLeft=function(t){return function(n){return e.bimap(n,t,r.yR)}}),d(e)&&(t.extend=function(t){return function(n){return e.extend(n,t)}},t.duplicate=function(t){return e.extend(t,r.yR)}),_(e)&&(t.reduce=function(t,n){return function(r){return e.reduce(r,t,n)}},t.foldMap=function(t){var n=e.foldMap(t);return function(e){return function(t){return n(t,e)}}},t.reduceRight=function(t,n){return function(r){return e.foldr(r,t,n)}}),f(e)&&(t.reduceWithIndex=function(t,n){return function(r){return e.reduceWithIndex(r,t,n)}},t.foldMapWithIndex=function(t){var n=e.foldMapWithIndex(t);return function(e){return function(t){return n(t,e)}}},t.reduceRightWithIndex=function(t,n){return function(r){return e.foldrWithIndex(r,t,n)}}),h(e)&&(t.alt=function(t){return function(n){return e.alt(n,t())}}),p(e)&&(t.compact=e.compact,t.separate=e.separate),g(e)&&(t.filter=function(t){return function(n){return e.filter(n,t)}},t.filterMap=function(t){return function(n){return e.filterMap(n,t)}},t.partition=function(t){return function(n){return e.partition(n,t)}},t.partitionMap=function(t){return function(n){return e.partitionMap(n,t)}}),v(e)&&(t.filterWithIndex=function(t){return function(n){return e.filterWithIndex(n,t)}},t.filterMapWithIndex=function(t){return function(n){return e.filterMapWithIndex(n,t)}},t.partitionWithIndex=function(t){return function(n){return e.partitionWithIndex(n,t)}},t.partitionMapWithIndex=function(t){return function(n){return e.partitionMapWithIndex(n,t)}}),m(e)&&(t.promap=function(t,n){return function(r){return e.promap(r,t,n)}}),y(e)&&(t.compose=function(t){return function(n){return e.compose(n,t)}}),b(e)&&(t.fromOption=function(t){return function(n){return"None"===n._tag?e.throwError(t()):e.of(n.value)}},t.fromEither=function(t){return"Left"===t._tag?e.throwError(t.value):e.of(t.value)},t.fromPredicate=function(t,n){return function(r){return t(r)?e.of(r):e.throwError(n(r))}},t.filterOrElse=function(t,n){return function(r){return e.chain(r,(function(r){return t(r)?e.of(r):e.throwError(n(r))}))}}),t}},3578:function(e,t){var r,i;i="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:this,e.exports=function(n){"use strict";var i,o=(n=n||{}).Base64,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=function(e){for(var t={},n=0,r=e.length;n>>6)+u(128|63&t):u(224|t>>>12&15)+u(128|t>>>6&63)+u(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return u(240|t>>>18&7)+u(128|t>>>12&63)+u(128|t>>>6&63)+u(128|63&t)},l=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,d=function(e){return e.replace(l,c)},_=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[a.charAt(n>>>18),a.charAt(n>>>12&63),t>=2?"=":a.charAt(n>>>6&63),t>=1?"=":a.charAt(63&n)].join("")},f=n.btoa&&"function"==typeof n.btoa?function(e){return n.btoa(e)}:function(e){if(e.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return e.replace(/[\s\S]{1,3}/g,_)},h=function(e){return f(d(String(e)))},p=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},g=function(e,t){return t?p(h(e)):h(e)};n.Uint8Array&&(i=function(e,t){for(var n="",r=0,i=e.length;r>>18)+a.charAt(c>>>12&63)+(void 0!==s?a.charAt(c>>>6&63):"=")+(void 0!==u?a.charAt(63&c):"=")}return t?p(n):n});var v,m=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,y=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return u(55296+(t>>>10))+u(56320+(1023&t));case 3:return u((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return u((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},b=function(e){return e.replace(m,y)},S=function(e){var t=e.length,n=t%4,r=(t>0?s[e.charAt(0)]<<18:0)|(t>1?s[e.charAt(1)]<<12:0)|(t>2?s[e.charAt(2)]<<6:0)|(t>3?s[e.charAt(3)]:0),i=[u(r>>>16),u(r>>>8&255),u(255&r)];return i.length-=[0,0,2,1][n],i.join("")},E=n.atob&&"function"==typeof n.atob?function(e){return n.atob(e)}:function(e){return e.replace(/\S{1,4}/g,S)},$=function(e){return E(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},T=function(e){return function(e){return b(E(e))}(String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,""))};if(n.Uint8Array&&(v=function(e){return Uint8Array.from($(e),(function(e){return e.charCodeAt(0)}))}),n.Base64={VERSION:"2.6.2",atob:$,btoa:f,fromBase64:T,toBase64:g,utob:d,encode:g,encodeURI:function(e){return g(e,!0)},btou:b,decode:T,noConflict:function(){var e=n.Base64;return n.Base64=o,e},fromUint8Array:i,toUint8Array:v},"function"==typeof Object.defineProperty){var A=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};n.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",A((function(){return T(this)}))),Object.defineProperty(String.prototype,"toBase64",A((function(e){return g(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",A((function(){return g(this,!0)})))}}return n.Meteor&&(Base64=n.Base64),e.exports?e.exports.Base64=n.Base64:void 0===(r=function(){return n.Base64}.apply(t,[]))||(e.exports=r),{Base64:n.Base64}}(i)},8157:(e,t)=>{"use strict";var n=Object.prototype.hasOwnProperty;function r(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function i(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var r,o,a=[];for(o in"string"!=typeof t&&(t="?"),e)if(n.call(e,o)){if((r=e[o])||null!=r&&!isNaN(r)||(r=""),o=i(o),r=i(r),null===o||null===r)continue;a.push(o+"="+r)}return a.length?t+a.join("&"):""},t.parse=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,i={};t=n.exec(e);){var o=r(t[1]),a=r(t[2]);null===o||null===a||o in i||(i[o]=a)}return i}},3096:e=>{"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},1114:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(4041),t),i(n(4859),t),i(n(6404),t),i(n(6482),t),i(n(4422),t),i(n(6734),t),i(n(6120),t),i(n(9034),t),i(n(9909),t),i(n(6631),t),i(n(4079),t)},4041:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(52),t)},6467:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.AuthTokenHelper=void 0;const i=n(9274),o=n(6120),a=n(8718),s=r(n(3136)),u=r(n(2701)),c=n(8353),l=o.Log.getLogger("AuthTokenHelper").filter("auth");function d(e){return(0,u.default)(e)&&void 0!==e.expiresAt}class _{static parse(e,t){const n=(()=>{switch(t){case i.AuthTokenType.Adobe:return a.AdobeTokenParser;case i.AuthTokenType.JWS:return a.JWSTokenParser}})();if(!n)return l.error(`Could not select parser for token type: ${t}`),c.none;let r;try{r=n.parse(e)}catch(e){return l.error(`Unable to parse ${t} auth token: ${e}`),c.none}return(0,c.fromNullable)(r)}static isExpired(e,t,n){var r,i;let o=null;if((0,s.default)(e)?o=_.parse(e,t).toNullable():d(e)&&(o=e),!o||!d(o))return c.none;const a=null!==(r=null==n?void 0:n.currentTime)&&void 0!==r?r:Date.now(),u=null!==(i=null==n?void 0:n.expiredThreshold)&&void 0!==i?i:10;return(0,c.fromNullable)(o.expiresAt.getTime()-a<=u)}}t.AuthTokenHelper=_},9274:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.AuthTokenType=void 0,function(e){e.Adobe="adobe",e.JWS="jws"}(n||(t.AuthTokenType=n={}))},52:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(6467),t),i(n(9274),t)},6262:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AdobeTokenParser=void 0;const r=n(9274),i=/\(\d+)\<\/ttl\>/,o=/\(.+)\<\/issueTime\>/,a=/\(.+)\<\/requestorID\>/,s=/\(.+)\<\/resourceID\>/;t.AdobeTokenParser={parse:e=>{const t={ttl:i.exec(e),issueTime:o.exec(e),requestorId:a.exec(e),resourceId:s.exec(e)};let n="",u="",c="",l=0;t.ttl&&t.issueTime&&(c=t.issueTime[1],l=parseInt(t.ttl[1],10));const d=e=>"Invalid Date"!==e.toString();let _=new Date(c);d(_)||(_=new Date((e=>{const t=e.split(" "),n=`${t[2].substr(0,3)}:${t[2].substr(3,5)}`;return`${t[0]}T${t[1]}${n}`})(c)));const f=new Date(_.getTime()+l);if(!d(_))throw new Error(`Invalid date string encountered while parsing Adobe auth token: ${c}`);return t.requestorId&&(n=t.requestorId[1]),t.resourceId&&(u=t.resourceId[1]),{type:r.AuthTokenType.Adobe,requestorId:n,resourceId:u,issuedAt:_,expiresAt:f}}}},3540:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JWSTokenParser=void 0;const r=n(9274),i=n(3578);t.JWSTokenParser={parse:e=>{const t=e.split(".")[1],{requestorId:n,resourceId:o,createdAt:a,expiresAt:s}=JSON.parse(i.Base64.atob(t));return{type:r.AuthTokenType.JWS,requestorId:n,resourceId:o,issuedAt:new Date(a),expiresAt:new Date(s)}}}},8718:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(6262),t),i(n(3540),t)},40:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedList=void 0,t.LinkedList=class{constructor(){this._length=0,this._head=null,this._tail=null}get length(){return this._length}get head(){return this._head}get tail(){return this._tail}insertBefore(e,t){const r=this.findNodeBy((t=>t===e));if(null===r)return!1;const i=n.create(t),o=r.previous;return o&&(r.previous=i,o.next=i,i.previous=o,i.next=r),this._length++,!0}insertAfter(e,t){const r=this.findNodeBy((t=>t===e));if(null===r)return!1;const i=n.create(t),o=r.next;return o&&(r.next=i,o.previous=i,i.previous=r,i.next=o),this._length++,!0}findBy(e){const t=this.findNodeBy(e);return t?t.value:null}peekBefore(e){const t=this.findNodeBy((t=>t===e));if(!t)return null;const n=t.previous;return n?n.value:null}peekAfter(e){const t=this.findNodeBy((t=>t===e));if(!t)return null;const n=t.next;return n?n.value:null}isLast(e){return e===this.last()}findNodeBy(e){let t=this._head;for(;null!==t;){if(e(t.value))return t;t=t.next}return null}findPreviousNodeBy(e){const t=this.findNodeBy(e);return t?t.previous:null}add(e){const t=this._tail,r=n.create(e);t&&(t.next=r,r.previous=t),this._head||(this._head=r),this._tail=r,this._length++}push(e){const t=this._head,r=n.create(e);t&&(t.previous=r,r.next=t),this._tail||(this._tail=r),this._head=r,this._length++}first(){return this._head?this._head.value:null}last(){return this._tail?this._tail.value:null}pop(){if(!this._head)return null;const e=this._head.value;return this._head=this._head.next,this._head||(this._tail=null),this._length--,e}isEmpty(){return null===this._head}remove(e){let t=this._head;for(;null!==t;){if(t.value===e)return t.previous?t.next?(t.previous.next=t.next,t.next.previous=t.previous):(this._tail=this._tail.previous,this._tail&&(this._tail.next=null)):(this._head=this._head.next,this._head&&(this._head.previous=null),this._tail===t&&(this._tail=this._head)),this._length--,t.value;t=t.next}return null}clear(){this._head=null,this._tail=null,this._length=0}iterator(){const e=[];let t=this._head;for(;null!==t;)e.push(t.value),t=t.next;return e}};class n{static create(e,t=null,r=null){const i=new n(e);return r&&(i.next=r),t&&(i.previous=t),i}constructor(e){this.value=e,this.previous=null,this.next=null}}},4859:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(40),t)},3914:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnreachableCaseError=void 0;class n extends Error{constructor(e){super(`Unreachable case: ${e}`)}}t.UnreachableCaseError=n},6404:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(3914),t)},891:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createEventCollection=t.createEvent=void 0;const r=n(3635),i=n(1808);t.createEvent=(e,t)=>new i.EventSignal(e,t),t.createEventCollection=(e,t)=>{const n=new r.EventCollection(e,t);return Object.keys(e).forEach((t=>n[t]=e[t])),n}},5162:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1808:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventSignal=void 0;const r=n(9034);t.EventSignal=class{constructor(e,t){this._type=e,this._context=t,this._signal=new r.Signal(t),this._before=new r.Signal(t),this._around=new r.Signal(t),this._after=new r.Signal(t)}get type(){return this._type}get context(){return this._context}get before(){return this._before}get around(){return this._around}get after(){return this._after}listen(e,t){return this._signal.listen(e,t)}once(e,t){return this._signal.once(e,t)}dispatch(e){let t={type:this.type};e&&(t=Object.assign(Object.assign({},e),t)),this._before.dispatch(t),this._around.dispatch(t),this._signal.dispatch(t),this._around.dispatch(t),this._after.dispatch(t)}has(e){return this._signal.has(e)}count(){return this._signal.count()}unlisten(e){this._signal.unlisten(e)}unlistenAll(){this._signal.unlistenAll()}}},568:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4555:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.EventCollection=void 0;const i=n(6631),o=r(n(4405));t.EventCollection=class{constructor(e,t){const n=i.ObjectUtils.getValues(e),r=o.default.getFactory(n,e,t);this._default=o.default.createFromFactory(r),this._before=o.default.createFromFactory(r.mapTo("before")),this._after=o.default.createFromFactory(r.mapTo("after")),this._around=o.default.createFromFactory(r.mapTo("around")),this._length=n.length}get before(){return this._before}get around(){return this._around}get after(){return this._after}get length(){return this._length}each(e){return this._default.each(e),this._default}once(e){return this._default.once(e)}listen(e){return this._default.listen(e)}has(e){return this._default.has(e)}unlisten(e){return this._default.unlisten(e),this._default}unlistenAll(){return this._default.unlistenAll(),this._default}removeAllListeners(){return this._default.removeAllListeners(),this._default}}},8685:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventBindingCollection=void 0;class n{constructor(e){this.id="collection_"+n.count++,this._bindings=e||[],this._detachedHandlers=[]}add(e){this._bindings.push(e)}remove(e){const t=this._bindings.indexOf(e);return-1!==t&&(this._bindings.splice(t,1),!0)}detach(){let e=!0;return this._bindings.forEach((t=>{e=e&&t.detach()})),this._detachedHandlers.forEach((e=>{e()})),this._detachedHandlers=[],e}onDetached(e){this._detachedHandlers.push(e)}empty(){return 0===this._bindings.length}}t.EventBindingCollection=n,n.count=1},4405:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(6631),o=r(n(8799));class a{static getFactory(e,t,n){return{events:()=>e,eventMap:()=>t,context:()=>n,mapTo:e=>{const n=[],r={};return Object.keys(t).forEach((i=>{const o=(t=>{const n={before:t.before,after:t.after,around:t.around}[e];if(n)return n;throw new Error(`Invalid mapEvent type: ${e}`)})(t[i]);n.push(o),r[i]=o})),a.getFactory(n,r)}}}static createFromFactory(e){return new o.default(e.events(),e.eventMap(),e.context())}static isListenForMap(e){return i.ObjectUtils.isObj(e)}static isEventCollectionHandler(e){return i.ObjectUtils.isFunc(e)}}t.default=a},3463:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8799:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(6631),o=n(8685),a=r(n(4405));t.default=class{constructor(e,t,n){this._context=n,this._events=e,this._eventsMap=t,this._bindings=[],this._length=this._events.length}_doEach(e){this._events.forEach((t=>e(t)))}_doListen(e){let t;if(a.default.isEventCollectionHandler(e))t=this._doListenForAll(e);else{if(!a.default.isListenForMap(e))throw new Error(`[doListen] invalid handler data type, got: ${e}`);t=this._doListenForMap(e)}return this._bindings.push(t),t}_doHas(e){return e instanceof o.EventBindingCollection&&-1!==this._bindings.indexOf(e)}_doUnlisten(e){if(e instanceof o.EventBindingCollection){const t=this._bindings.indexOf(e);this._bindings.splice(t,1),e.detach()}}_doListenOnce(e){let t;if(a.default.isEventCollectionHandler(e))t=this._doListenOnceForAll(e);else{if(!a.default.isListenForMap(e))throw new Error(`[doListenOnce] invalid handler data type, got: ${e}`);t=this._doListenForMapOnce(e)}return this._bindings.push(t),t}_doListenOnceForAll(e){const t=new o.EventBindingCollection;return this._doEach((n=>{const r=e,i=this._toEventCollectionHandler(n.type,r),o=n.once(i);o.onDetached((()=>{this._removeSingleBinding(t.id,o)})),t.add(o)})),t}_doListenForMapOnce(e){const t=new o.EventBindingCollection;return i.ObjectUtils.keyValues(e).forEach((e=>{const n=this._eventsMap[e.key],r=e.value,i=this._toEventCollectionHandler(n.type,r);if(n){const e=n.once(i);e.onDetached((()=>{this._removeSingleBinding(t.id,e)})),t.add(e)}})),t}_doListenForAll(e){const t=new o.EventBindingCollection;return this._doEach((n=>{const r=e,i=this._toEventCollectionHandler(n.type,r),o=n.listen(i);t.add(o)})),t}_doListenForMap(e){const t=new o.EventBindingCollection;return i.ObjectUtils.keyValues(e).forEach((e=>{const n=this._eventsMap[e.key],r=e.value;if(n){const e=n.listen(r);t.add(e)}})),t}_toEventCollectionHandler(e,t){return t.bind(this._context||null,e)}_removeSingleBinding(e,t){const n=this._getCollectionBinding(e);null!==n&&(n.remove(t),n.empty()&&this.unlisten(n))}_getCollectionBinding(e){let t=null;for(const n of this._bindings)if(n.id===e){t=n;break}return t}get length(){return this._length}each(e){return this._doEach(e),this}once(e){return this._doListenOnce(e)}listen(e){return this._doListen(e)}has(e){return this._doHas(e)}unlisten(e){return this._doUnlisten(e),this}unlistenAll(){return this._bindings.forEach((e=>{e.detach()})),this._bindings=[],this}removeAllListeners(){return this.unlistenAll(),this.each((e=>{e.unlistenAll()})),this}}},3635:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(4555),t),i(n(8685),t),i(n(4405),t),i(n(3463),t),i(n(3463),t),i(n(8799),t)},6482:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(3635),t),i(n(891),t),i(n(5162),t),i(n(1808),t),i(n(568),t)},8353:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pipe=t.left=t.right=t.map=t.fromEither=t.none=t.fromNullable=void 0;var r=n(566);Object.defineProperty(t,"fromNullable",{enumerable:!0,get:function(){return r.fromNullable}}),Object.defineProperty(t,"none",{enumerable:!0,get:function(){return r.none}}),Object.defineProperty(t,"fromEither",{enumerable:!0,get:function(){return r.fromEither}}),Object.defineProperty(t,"map",{enumerable:!0,get:function(){return r.map}});var i=n(8404);Object.defineProperty(t,"right",{enumerable:!0,get:function(){return i.right}}),Object.defineProperty(t,"left",{enumerable:!0,get:function(){return i.left}});var o=n(327);Object.defineProperty(t,"pipe",{enumerable:!0,get:function(){return o.pipe}})},6167:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Fsm=void 0;const r=n(6120),i=n(1556),o=n(7655),a=r.Log.getLogger("Fsm").filter("std");a.setEnabled(!1),t.Fsm=class{constructor(){this._events=(0,i.createFsmEventCollection)(),this._eventTransitions=new Map,this._stateTransitions=new Map,this._eventList=new Map,this._previousState=null,this._currentState=null,this._finalState=null,this._currentTransition=null,this._currentTransitionCBs=this._getTransitionCBs({})}_doInit(e){this._config=e,this._initialState=e.initial,this._finalState=e.end?e.end:null,this._addEvent({name:this._initialState.name,from:[null],to:this._initialState.state},!0),e.events.forEach((e=>this._addEvent(e))),this._stateTransitions.forEach(((e,t)=>{this._eventList.set(t,this._buildEvent(t,e))})),this._currentState=null,this._doFire(this._initialState.name)}_doFire(e,t){const n=this._eventList.get(e);return n?n(t):o.FsmTransitionResult.Error}_doCanFire(e){const t=this._stateTransitions.get(e),n=null===this._currentTransition&&t&&t.has(this._currentState),r=this._stateTransitions.has(o.FsmDefaultEvents.Wildcard)||(null==t?void 0:t.has(o.FsmDefaultEvents.Wildcard));return n||r}_doCannotFire(e){return!this._doCanFire(e)}_addEvent(e,t=!1){const n=t?o.FsmDefaultStates.No_State:o.FsmDefaultEvents.Wildcard,r=e.to,i=e.from?e.from:[n];this._stateTransitions.has(e.name)||this._stateTransitions.set(e.name,new Map);for(let t=0;t{n=n||[];const r=this._currentState,i=t.get(r);let a;if(i&&(a=i.to),a||(a=t.get(o.FsmDefaultEvents.Wildcard)&&t.get(o.FsmDefaultEvents.Wildcard).to&&t.get(o.FsmDefaultEvents.Wildcard).to!==o.FsmDefaultEvents.Wildcard?t.get(o.FsmDefaultEvents.Wildcard).to:r),null!==this._currentTransition)return this._handleError(e,r,a,n,o.FsmError.Pending_Transition,`event ${e} inappropriate because previous transition did not complete`),o.FsmTransitionResult.Error;if(this.cannotFireTransition(e))return this._handleError(e,r,a,n,o.FsmError.Invalid_Transition,`event ${e} inappropriate in current state ${r}`),o.FsmTransitionResult.Error;if(this._currentTransitionCBs=this._getTransitionCBs(i),!1===this._handleBeforeEvent(e,r,a,n))return o.FsmTransitionResult.Canceled;if(r===a)return this._handleAfterEvent(e,r,a,n),o.FsmTransitionResult.No_Transition;this._currentTransition=this._createTransition(e,r,a,n);const s=this._handleLeaveState(e,r,a,n);return!1===s?(this._currentTransition=null,o.FsmTransitionResult.Canceled):s===o.FsmModes.Async?o.FsmTransitionResult.Pending:null!==this._currentTransition?this._currentTransition.execute():o.FsmTransitionResult.Error}}_createTransition(e,t,n,r){return{execute:()=>(this._currentTransition=null,this._previousState=this._currentState,this._currentState=n,this._handleStateEntered(e,t,n,r),this._handleStateChanged(e,t,n,r),this._handleAfterEvent(e,t,n,r),o.FsmTransitionResult.Succeeded),cancel:()=>(this._currentTransition=null,this._handleAfterEvent(e,t,n,r),o.FsmTransitionResult.Canceled)}}_getTransitionCBs(e){const t=()=>{},n=()=>!0;return{onBeforeEvent:(e=e||{}).onBeforeEvent||n,onStateEntered:e.onStateEntered||t,onStateChanged:e.onStateChanged||t,onAfterEvent:e.onAfterEvent||t,onLeave:e.onLeave||n,onError:e.onError||t}}_handleError(e,t,n,r,i,o){a.debug(`[handleError] trigger: ${e}, from: ${this._previousState}, to: ${n}, errorType: ${i}, desc: ${o}`),this._currentTransitionCBs.onError(e,this._previousState,n,r,i,o),this._notifyError(e,this._previousState,n,r,i,o)}_handleBeforeEvent(e,t,n,r){return a.debug(`[handleBeforeEvent] trigger: ${e}, from: ${this._currentState}, to: ${n}`),!!this._currentTransitionCBs.onBeforeEvent(e,this._currentState,n,r)&&(this._notifyBeforeEvent(e,this._currentState,n,r),!0)}_handleLeaveState(e,t,n,r){return this._currentTransitionCBs.onLeave(e,t,n,r)}_handleStateEntered(e,t,n,r){a.debug(`[handleStateEntered] trigger: ${e}, from: ${this._previousState}, to: ${n}`),this._currentTransitionCBs.onStateEntered(e,this._previousState,n,r),this._notifyStateEntered(e,this._previousState,n,r)}_handleStateChanged(e,t,n,r){a.debug(`[handleStateChanged] trigger: ${e}, from: ${this._previousState}, to: ${n}`),this._currentTransitionCBs.onStateChanged(e,this._previousState,n,r),this._notifyStateChanged(e,this._previousState,n,r)}_handleAfterEvent(e,t,n,r){a.debug(`[handleAfterEvent] trigger: ${e}, from: ${this._previousState}, to: ${n}`),this._currentTransitionCBs.onAfterEvent(e,this._previousState,n,r),this._notifyAfterEvent(e,this._previousState,n,r)}_notifyBeforeEvent(e,t,n,r){this._events.beforeEvent.dispatch({name:e,from:t,to:n,args:r})}_notifyStateEntered(e,t,n,r){this._events.stateEntered.dispatch({name:e,from:t,to:n,args:r})}_notifyStateChanged(e,t,n,r){this._events.stateChanged.dispatch({name:e,from:t,to:n,args:r})}_notifyAfterEvent(e,t,n,r){this._events.afterEvent.dispatch({name:e,from:t,to:n,args:r})}_notifyError(e,t,n,r,i,o){this._events.error.dispatch({name:e,from:t,to:n,args:r,errorType:i,errorDesc:o})}get events(){return this._events}init(e){return this._doInit(e),this}currentState(){return this._currentState}previousState(){return this._previousState}fireTransition(e,t){return this._doFire(e,t)}attemptTransition(e,t){return this.cannotFireTransition(e)?(a.warn(`[_attemptTransition] Unable to fire ${e} from current state: ${this.currentState()}`),null):this.fireTransition(e,t)}canFireTransition(e){return this._doCanFire(e)}cannotFireTransition(e){return this._doCannotFire(e)}completeTransition(){return this._currentTransition?this._currentTransition.execute():o.FsmTransitionResult.No_Transition}cancelTransition(){return this._currentTransition?this._currentTransition.cancel():o.FsmTransitionResult.No_Transition}isTransitioning(){return null!==this._currentTransition}}},7655:(e,t)=>{"use strict";var n,r,i,o,a;Object.defineProperty(t,"__esModule",{value:!0}),t.FsmError=t.FsmTransitionResult=t.FsmModes=t.FsmDefaultStates=t.FsmDefaultEvents=void 0,function(e){e.Wildcard="*"}(n||(t.FsmDefaultEvents=n={})),function(e){e.No_State="__no_state__"}(r||(t.FsmDefaultStates=r={})),function(e){e.Sync="sync",e.Async="async"}(i||(t.FsmModes=i={})),function(e){e.Succeeded="succeeded",e.No_Transition="no_transition",e.Canceled="canceled",e.Pending="pending",e.Error="error"}(o||(t.FsmTransitionResult=o={})),function(e){e[e.Invalid_Transition=100]="Invalid_Transition",e[e.Pending_Transition=200]="Pending_Transition"}(a||(t.FsmError=a={}))},7773:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFsmEventCollection=t.createFsmEvent=void 0;const r=n(6482),i=n(2531);function o(e){return(0,r.createEvent)(e)}t.createFsmEvent=o,t.createFsmEventCollection=function(){return(0,r.createEventCollection)({beforeEvent:o(i.FsmEventType.Before_Event),stateEntered:o(i.FsmEventType.State_Entered),stateChanged:o(i.FsmEventType.State_Changed),afterEvent:o(i.FsmEventType.After_Event),error:o(i.FsmEventType.Error)})}},2201:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2531:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.FsmEventType=void 0,function(e){e.Before_Event="beforeEvent",e.State_Entered="stateEntered",e.State_Changed="stateChanged",e.After_Event="afterEvent",e.Error="error"}(n||(t.FsmEventType=n={}))},1556:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(7773),t),i(n(2201),t),i(n(2531),t)},4422:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(1556),t),i(n(6167),t),i(n(7655),t)},7489:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseHook=void 0;const r=n(1114),i=n(6728);class o{static createFor(e){const t=r.Log.getLogger(`Hook:${e}`);return new o(e,t)}constructor(e,t){this._hookName=e,this._logger=t,this._handlers=new Map}get handlers(){const e={};return this._handlers.forEach(((t,n)=>e[n]=t)),e}set(e,t=i.HookHandlerType.Default){const n=this._handlers.get(t)||[];t===i.HookHandlerType.Peripheral?(this._logger.info("Setting peripheral handler"),n.length>0&&(this._logger.warn("Only one peripheral handler may be set per-hook"),r.ArrayUtils.remove(n,n[0]))):this._logger.info("Adding default hook handler"),n.push(e),this._handlers.set(t,n)}clear(e){if("function"==typeof e){const t=e;return this._logger.info("Removing given handler from hook"),void this._handlers.forEach((e=>r.ArrayUtils.remove(e,t)))}const t=e||i.HookHandlerType.Default;this._logger.info(`Removing ${t} handlers for hook`),this._handlers.delete(t)}clearAll(){this._handlers.clear()}}t.BaseHook=o},4243:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CoreHook=void 0;const r=n(9909),i=n(6631),o=n(6728);t.CoreHook=class{constructor(e){var t;this._options={executionTimeout:null!==(t=null==e?void 0:e.executionTimeout)&&void 0!==t?t:1e4},this._baseHandler=e=>Promise.resolve(e),this._handlers={[o.HookHandlerType.Peripheral]:[],[o.HookHandlerType.Default]:[]},this._activeTask=null}_cleanupActiveTask(){this._activeTask&&(this._activeTask.cancel(),this._activeTask=null)}_handlersToPipeables(e){return this._handlers[e].map((e=>function(t){return r.TaskFactory.create((n=>{e(t).then((e=>n.resolve(e))).catch((e=>n.reject(e)))}))}))}get hasRegisteredHandlers(){return this._handlers.default.length>0||this._handlers.peripheral.length>0}hasRegisteredHandlersByType(e){return this._handlers[e].length>0}add(e,t=o.HookHandlerType.Default){return this._handlers[t].push(e),this}remove(e,t=o.HookHandlerType.Default){return i.ArrayUtils.remove(this._handlers[t],e),this}execute(e){this._cleanupActiveTask();const t=r.TaskFactory.create((t=>{this._baseHandler(e).then((e=>t.resolve(e))).catch((e=>t.reject(e)))}));return this._activeTask=r.TaskFactory.create((e=>{const n=function(e){let t=null;return r.TaskFactory.create((n=>{t=(0,i.Timer)(i.TimerMode.Timeout,(()=>{n.reject(`Hook execution timeout of ${e}ms reached`)}),e),t.start()})).onCanceled((()=>{t&&(t.stop(),t=null)}))}(this._options.executionTimeout).execute().onRejected((t=>e.reject(t))),a=[{type:o.HookHandlerType.Peripheral,handlers:this._handlersToPipeables(o.HookHandlerType.Peripheral)},{type:o.HookHandlerType.Default,handlers:this._handlersToPipeables(o.HookHandlerType.Default)}];let s=t;a.forEach((e=>{e.handlers.forEach((e=>s=s.pipe(e)))})),s.execute().fold((t=>{n.cancel(),e.reject(t)}),(t=>{n.cancel(),e.resolve(t)}))})),this._activeTask.execute()}cancel(){return this._cleanupActiveTask(),this}clear(e=o.HookHandlerType.Default){return this._handlers[e].length=0,this}clearAll(){return Object.keys(this._handlers).forEach((e=>{const t=e;this.clear(t)})),this}}},6728:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.HookHandlerType=void 0,function(e){e.Peripheral="peripheral",e.Default="default"}(n||(t.HookHandlerType=n={}))},54:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4828:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9976:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BridgeHookEventHandler=void 0;const r=n(932);t.BridgeHookEventHandler=class{static createFor(e,t="hook:event",n){return(0,r.BridgeHookEventProxyHandler)(e,t,n)}}},932:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BridgeHookEventProxyHandler=void 0;const r=n(1206),i=n(1114);t.BridgeHookEventProxyHandler=function(e,t="hook:event",n){const o=i.Log.getLogger(`BridgeHookEventProxyHandler|${t}`),a={};return function(s){var u;const{type:c,hook:l}=s;switch(c){case r.BridgeHookEventType.Added:{const{handlerId:o,handlerType:u}=s,d=function(n){const s=(0,i.createDeferred)();a[o].executionPromise=s;const c={type:r.BridgeHookEventType.Executing,hook:l,handlerId:o,handlerType:u,data:n};return e.send(t,c),s.promise};a[o]={executionPromise:null,handler:d,handlerType:u},(null==n?void 0:n.onHandlerAdded)&&n.onHandlerAdded(d,{type:c,hook:l,handlerId:o,handlerType:u});break}case r.BridgeHookEventType.Removed:{const{handlerId:e,handlerType:t}=s;if(e&&a[e]){const r=a[e].handler;(null==n?void 0:n.onHandlerRemoved)&&n.onHandlerRemoved(r,{hook:l,type:c,handlerId:e,handlerType:t}),delete a[e]}else t?((null==n?void 0:n.onHandlerRemoved)&&n.onHandlerRemoved(t,{hook:l,type:c,handlerId:e,handlerType:t}),Object.keys(a).forEach((e=>{const n=a[e];n&&n.handlerType===t&&delete a[e]}))):o.warn(`Unable to clear hook handler for ${l}`);break}case r.BridgeHookEventType.Executing:if(null==n?void 0:n.onExecuting){const{handlerId:e,handlerType:t,data:r}=s;n.onExecuting({hook:l,type:c,handlerId:e,handlerType:t,data:r})}break;case r.BridgeHookEventType.Executed:const{handlerId:d,handlerType:_,error:f,result:h}=s,p=null===(u=a[d])||void 0===u?void 0:u.executionPromise;if(!p){o.warn(`Could not resolve or reject hook handler for ${l}`);break}(null==n?void 0:n.onExecuted)&&n.onExecuted({hook:l,type:c,handlerId:d,handlerType:_,error:f,result:h}),f?p.rejector(f):p.resolver(h);break;default:throw new i.UnreachableCaseError(c)}}}},1206:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.BridgeHookEventType=void 0,function(e){e.Added="added",e.Removed="removed",e.Executing="executing",e.Executed="executed"}(n||(t.BridgeHookEventType=n={}))},7140:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(9976),t),i(n(932),t),i(n(1206),t)},6734:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(4243),t),i(n(7489),t),i(n(6728),t),i(n(54),t),i(n(4828),t),i(n(7140),t)},2695:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3301:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Log=void 0;const r=n(8009),i=n(4614);class o{factory(e){return new o(e)}constructor(e){if(this._presets={},this._manager=r.LogManager,e){Object.assign(this._presets,e);const{source:t,enabled:n}=e;null!=t&&null!=n&&this._manager.updateConfig({sources:{[t]:n}})}}get data(){return this._manager.data}get enabled(){return this._manager.enabled}get events(){return this._manager.events}getLogger(e,t){return this._manager.getLogger(e,i.ObjectUtils.extendDeep({},this._presets,t))}setEnabled(e){this.updateConfig({enabled:e})}setTheme(e){this._manager.setTheme(e)}updateSources(e){this.updateConfig({sources:e})}updateCategories(e){this.updateConfig({categories:e})}updateLevels(e){this.updateConfig({levels:e})}updateConfig(e){this._manager.updateConfig(e)}useDefaults(){this._manager.useDefaults()}}const a=new o;t.Log=a},8009:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogManager=void 0;const r=n(6631),i=n(7263),o=n(1848),a=n(6527),s=n(4526),u=n(3039),c=n(8733),l=new class{constructor(){this._enabled=!1,this.events=(0,c.createLogEventCollection)(),this._data=s.LogManagerDefaults.data(),this._activeTargets=[new a.ConsoleTarget({theme:this._data.theme}).init(),new a.LogEventTarget(this.events).init()]}_notifyConfigChanged(){this.events.configChanged.dispatch({data:this.data})}get data(){return r.ObjectUtils.extendDeep({},this._data)}get enabled(){return this._enabled}getLogger(e,t={}){var n;const{source:a=i.LogSourceType.Unsourced}=t,s=a===i.LogSourceCompositeType.All?i.LogSourceType.Unsourced:(0,o.normalizeSource)(a),{sources:c,categories:l,levels:d}=this._data,_={manager:this,context:e,contextDetail:"",targets:this._activeTargets,enabled:null!==(n=c[s])&&void 0!==n&&n,source:s,sources:Object.assign({},c),categories:Object.assign({},l),levels:Object.assign({},d),filters:[]},f=r.ObjectUtils.extendDeep(_,t,{source:s});s in c||this.updateConfig({sources:{[s]:f.enabled}});const h=(new u.DefaultLogger).init(f);return this.storeLoggerInstance(h),h}_setEnabled(e){this._enabled=e,this._notifyConfigChanged()}_updateTargetsTheme(){const{theme:e}=this._data;this._activeTargets.forEach((t=>{t.updateTheme(e)}))}setTheme(e){this._data.theme=e,this._updateTargetsTheme(),this._notifyConfigChanged()}_setTargets(e){e!==this._activeTargets&&(this._activeTargets.length&&this._activeTargets.forEach((e=>e.detach())),this._activeTargets=e,this._updateTargetsTheme(),this._data.loggerInstances.forEach((e=>{e.setTargets(this._activeTargets)})))}_updateSources(e){const t=Object.assign({},this._data.sources),n=Object.assign({},t),a=r.ObjectUtils.keyValues(e);a.sort(o.bySource),a.forEach((({key:e,value:r})=>{e===i.LogSourceCompositeType.All?Object.keys(t).forEach((e=>{n[e]=r})):n[e]=r})),Object.assign(this._data.sources,n),this._data.loggerInstances.forEach((e=>{e.updateSources(n)}))}_updateCategories(e){const t=Object.assign({},this._data.categories),n=Object.keys(t),a=Object.assign({},t),s=(e,t)=>{e.forEach((e=>a[e]=t))},u=r.ObjectUtils.keyValues(e);u.sort(o.byReversedNamespaceDepth),u.sort(o.byCategory),u.forEach((({key:e,value:t})=>{if(e===i.LogCategoryCompositeType.All)s(n,t);else{const r=[e,...(0,o.findChildCategoryKeys)(n,e)];s(r,t)}})),this._data.categories=a,this._data.loggerInstances.forEach((e=>{e.updateCategories(a)}))}_updateLevels(e){const t=Object.assign({},this._data.levels),n=Object.assign({},t),i=r.ObjectUtils.keyValues(e);i.sort(o.byLevel),i.forEach((({key:e,value:t})=>{o.LogLevelCompositeTypeValues.includes(e)?(0,o.expandCompositeLevel)(e).forEach((e=>n[e]=t)):n[e]=t})),this._data.levels=n,this._data.loggerInstances.forEach((e=>{e.updateLevels(n)}))}updateConfig(e){const{theme:t,targets:n,enabled:i,sources:a,categories:s,levels:u}=e;let c=!1;if(null!=t&&(this.setTheme(t),c=!0),Array.isArray(n)&&(this._setTargets(n),c=!0),null!=i&&(this._setEnabled(Boolean(i)),c=!0),null!=a){const e=r.ObjectUtils.keyValues(a).reduce(((e,{key:t,value:n})=>(e[(0,o.normalizeSource)(t)]=Boolean(n),e)),{});this._updateSources(e),c=!0}null==s||r.ObjectUtils.isEmpty(s)||(this._updateCategories(s),c=!0),null==u||r.ObjectUtils.isEmpty(u)||(this._updateLevels(u),c=!0),c&&this._notifyConfigChanged()}storeLoggerInstance(e){this._data.loggerInstances.push(e)}removeLoggerInstance(e){r.ArrayUtils.remove(this._data.loggerInstances,e)}registerFilter(e){const{categories:t}=this._data;if(e in t)return;const n=!r.ObjectUtils.isEmpty(t)&&(0,o.getFilterVisibility)(t,e);this._data.categories[e]=n}useDefaults(){const e=s.LogManagerDefaults.data(),{categories:t,levels:n}=e;this._data.categories=t,this._data.levels=n,this._data.loggerInstances.forEach((e=>{e.updateCategories(t),e.updateLevels(n)}))}};t.LogManager=l},4526:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogManagerDefaults=void 0;const r=n(7263);t.LogManagerDefaults=class{static data(){return{enabled:!1,theme:r.LogTheme.Light,loggerInstances:[],sources:{[r.LogSourceType.Unsourced]:!0},categories:{},levels:{[r.LogLevelType.Verbose]:!1,[r.LogLevelType.Debug]:!1,[r.LogLevelType.Info]:!0,[r.LogLevelType.Warn]:!0,[r.LogLevelType.Error]:!0}}}}},1848:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFilterVisibility=t.findChildCategoryKeys=t.byReversedNamespaceDepth=t.byCategory=t.byLevel=t.bySource=t.expandCompositeLevel=t.normalizeSource=t.LogLevelCompositeTypeValues=void 0;const r=n(7263),i=n(6664);t.LogLevelCompositeTypeValues=Object.values(r.LogLevelCompositeType),t.normalizeSource=e=>String(e).toLowerCase(),t.expandCompositeLevel=e=>{switch(e){case r.LogLevelCompositeType.All:return[r.LogLevelType.Verbose,r.LogLevelType.Debug,r.LogLevelType.Info,r.LogLevelType.Warn,r.LogLevelType.Error];case r.LogLevelCompositeType.Dev:return[r.LogLevelType.Debug,r.LogLevelType.Info,r.LogLevelType.Warn,r.LogLevelType.Error];default:return[e]}},t.bySource=({key:e},{key:t})=>e===r.LogSourceCompositeType.All?-1:t===r.LogSourceCompositeType.All?1:0,t.byLevel=({key:e},{key:n})=>e===r.LogLevelCompositeType.All?-1:n===r.LogLevelCompositeType.All?1:t.LogLevelCompositeTypeValues.includes(e)&&!t.LogLevelCompositeTypeValues.includes(n)?-1:t.LogLevelCompositeTypeValues.includes(n)&&!t.LogLevelCompositeTypeValues.includes(e)?1:0,t.byCategory=({key:e},{key:t})=>e===r.LogCategoryCompositeType.All?-1:t===r.LogCategoryCompositeType.All?1:0,t.byReversedNamespaceDepth=({key:e},{key:t})=>{const n=e.split(".").length,r=t.split(".").length;return n>r?-1:n{const n=new RegExp(`^${(0,i.escape)(t)}\\.`);return e.filter((e=>n.test(e)))},t.getFilterVisibility=(e,n)=>{if(n in e)return e[n]||!1;const r=n.split(".");if(!(r.length>1))return!1;const i=r.slice(0,-1).join(".");return(0,t.getFilterVisibility)(e,i)}},7263:(e,t)=>{"use strict";var n,r,i,o,a,s,u;Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevelCompositeType=t.LogCategoryCompositeType=t.LogSourceCompositeType=t.LogTheme=t.LogLevelType=t.LogDataProperty=t.LogSourceType=void 0,function(e){e.Enabled="enabled",e.Theme="theme",e.Instances="loggerInstances",e.Targets="targets",e.Sources="sources",e.Categories="categories",e.Levels="levels"}(n||(t.LogDataProperty=n={})),function(e){e.Unsourced=""}(r||(t.LogSourceType=r={})),function(e){e.Verbose="verbose",e.Debug="debug",e.Info="info",e.Warn="warn",e.Error="error"}(i||(t.LogLevelType=i={})),function(e){e.All="all",e.Dev="dev"}(o||(t.LogLevelCompositeType=o={})),function(e){e.Light="light",e.Dark="dark"}(a||(t.LogTheme=a={})),function(e){e.All="all"}(s||(t.LogSourceCompositeType=s={})),function(e){e.All="all"}(u||(t.LogCategoryCompositeType=u={}))},8437:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8733:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createLogEventCollection=t.createLogEvent=void 0;const r=n(6482),i=n(2233);function o(e){return(0,r.createEvent)(e)}t.createLogEvent=o,t.createLogEventCollection=function(){return(0,r.createEventCollection)({verbose:o(i.LogEventType.Verbose),debug:o(i.LogEventType.Debug),info:o(i.LogEventType.Info),warning:o(i.LogEventType.Warning),error:o(i.LogEventType.Error),configChanged:o(i.LogEventType.Config_Changed)})}},7488:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2233:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.LogEventType=void 0,function(e){e.Verbose="verbose",e.Debug="debug",e.Info="info",e.Warning="warning",e.Error="error",e.Config_Changed="configChanged"}(n||(t.LogEventType=n={}))},1813:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(8733),t),i(n(7488),t),i(n(2233),t)},9832:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultFormatters=void 0,t.DefaultFormatters=class{static cssConsole(e){return""!==e.contextDetail?`%c${e.context} %c(${e.contextDetail}) ${e.message}`:`%c${e.context} %c${e.message}`}}},6718:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(9832),t)},823:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogOverrideHelper=void 0;const r=n(2211),i=n(6631),o=n(3301),a=n(7263),s=e=>{const t=(0,i.getQueryAsMap)(e);return i.ObjectUtils.keyValues(t).map((({key:e,value:t})=>{switch(t=t||"",e){case r.LogQueryParam.Debug:return u(t);case r.LogQueryParam.Enabled:return c(t);case r.LogQueryParam.Theme:return l(t);case r.LogQueryParam.Category:return d(t);case r.LogQueryParam.Sources:return _(t);case r.LogQueryParam.Levels:return f(t);default:return}})).reduce(((e,t)=>(i.ObjectUtils.extendDeep(e,t),e)),{})},u=e=>{if("true"===e)return{enabled:!0,levels:{[a.LogLevelCompositeType.Dev]:!0}}},c=e=>{const t="true"===e;if(t)return{enabled:t}},l=e=>{switch(e){case a.LogTheme.Dark:return{theme:a.LogTheme.Dark};case a.LogTheme.Light:return{theme:a.LogTheme.Light};default:return}},d=e=>{const t=h(e);if(t.length>0)return{categories:i.ArrayUtils.mapToObj(t,((e,t)=>{t[e]=!0}))}},_=e=>{const t=h(e);if(t.length>0){const e=i.ArrayUtils.mapToObj(t,((e,t)=>{t[e]=!0}));return{sources:Object.assign({[a.LogSourceCompositeType.All]:!1},e)}}},f=e=>{const t=h(e);if(t.length>0){const e=i.ArrayUtils.mapToObj(t,((e,t)=>{t[e]=!0}));return{levels:Object.assign({[a.LogSourceCompositeType.All]:!1},e)}}},h=(e,t="|")=>{const n=encodeURIComponent(t),r=new RegExp(`${(0,i.escape)(t)}|${(0,i.escape)(n)}`,"g");return(0,i.split)(e,r).map((e=>e.trim()))};t.LogOverrideHelper={applyOverridesFromURL:e=>{const t=s(e);t&&o.Log.updateConfig(t)},getLogConfigFromURL:s}},2211:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.LogQueryParam=void 0,function(e){e.Debug="topdebug",e.Enabled="toplogenabled",e.Sources="toplogsources",e.Category="toplogcat",e.Levels="toploglevels",e.Theme="toplogtheme"}(n||(t.LogQueryParam=n={}))},2935:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(823),t),i(n(2211),t)},2466:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultLogger=void 0;const r=n(6631),o=n(7263),a=n(1848);class s{constructor(){this._sources={},this._categories={},this._levels={}}_sendMessage(e,t){const n={time:Date.now(),context:this._context,contextDetail:this._contextDetail,type:e,message:t};this._targets.forEach((e=>{try{e.sendMessage(n)}catch(e){i.warn("[sendMessage] Unable to send log message to target, error:",e)}}))}_applyFiltersAndToggle(){this._enabled=this._canBeEnabled,this._enabled&&this._filters&&this._filters.forEach((e=>{const t=!0===e||(0,r.isString)(e)&&(0,a.getFilterVisibility)(this._categories,e);this._enabled=this._enabled&&t}))}_createChildLogger(e={}){var t;const n=r.ObjectUtils.extendDeep({},this._options,e);n.filters=r.ArrayUtils.dedupe(n.filters);const i=(new s).init(n);return null===(t=this._manager)||void 0===t||t.storeLoggerInstance(i),i}_sendMessageWithType(e,t){this._manager.enabled&&this._enabled&&this._levels[e]&&this._sendMessage(e,t)}init(e={}){const t={context:"",contextDetail:"",targets:[],source:o.LogSourceType.Unsourced,enabled:!0,categories:{},levels:{},filters:[]},n=r.ObjectUtils.extendDeep(t,e),{manager:i,context:a,contextDetail:s,targets:u,enabled:c,source:l,sources:d,categories:_,levels:f,filters:h}=n;return i&&(this._manager=i),this._context=a,this._contextDetail=s,this._source=l,this._targets=u,this._filters=h,this._options=n,this.setEnabled(c),this.updateSources(d),this.updateCategories(_),this.updateLevels(f),this}verbose(e){this._sendMessageWithType(o.LogLevelType.Verbose,e)}debug(e){this._sendMessageWithType(o.LogLevelType.Debug,e)}info(e){this._sendMessageWithType(o.LogLevelType.Info,e)}warn(e){this._sendMessageWithType(o.LogLevelType.Warn,e)}error(e){this._sendMessageWithType(o.LogLevelType.Error,e)}filter(e){(0,r.isString)(e)&&this._manager.registerFilter(e);const t=[...this._filters,e];return this._createChildLogger({filters:t})}child(e){const t=""===this._contextDetail?e:`${this._contextDetail} | ${e}`;return this._createChildLogger({contextDetail:t})}setEnabled(e){this._canBeEnabled=e,this._applyFiltersAndToggle()}setTargets(e){this._targets=e}getSource(){return this._source}updateSources(e){Object.assign(this._sources,e);const t=this.getSource();t in e&&this.setEnabled(e[t]||!1),this._applyFiltersAndToggle()}updateCategories(e){Object.assign(this._categories,e),this._applyFiltersAndToggle()}updateLevels(e){Object.assign(this._levels,e),this._applyFiltersAndToggle()}destroy(){var e;null===(e=this._manager)||void 0===e||e.removeLoggerInstance(this)}}t.DefaultLogger=s},2770:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleLogger=void 0;const r=n(7263);t.SimpleLogger=class{constructor(e){this._className=e}_call(e,t){const n=`[${this._className}] ${t}`;switch(e){case r.LogLevelType.Debug:i.debug(n);break;case r.LogLevelType.Info:i.info(n);break;case r.LogLevelType.Warn:i.warn(n);break;case r.LogLevelType.Error:i.error(n);break;default:i.log(n)}}init(e){return this}debug(e){this._call(r.LogLevelType.Debug,e)}info(e){this._call(r.LogLevelType.Info,e)}warn(e){this._call(r.LogLevelType.Warn,e)}error(e){this._call(r.LogLevelType.Error,e)}verbose(e){this._call(r.LogLevelType.Verbose,e)}filter(e){return this}child(e){return this}setEnabled(e){}setTargets(e){}getSource(){return r.LogSourceType.Unsourced}updateSources(e){}updateCategories(e){}updateLevels(e){}}},3039:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(2466),t),i(n(2770),t)},6120:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(1813),t),i(n(6718),t),i(n(2935),t),i(n(3039),t),i(n(6527),t),i(n(3301),t),i(n(8437),t),i(n(2695),t),i(n(8009),t),i(n(4526),t),i(n(7263),t)},7081:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConsoleTarget=void 0;const r=n(6631),o=n(7263),a=n(9832);t.ConsoleTarget=class{constructor(e){this._enabled=!0;const t={theme:o.LogTheme.Light};e=e||{};const n=Object.assign(Object.assign({},t),e);this.updateTheme(n.theme)}detach(){this._enabled=!1}init(e){return this._options=r.ObjectUtils.extendDeep({formatter:a.DefaultFormatters.cssConsole},e||{}),this._formatter=this._options.formatter,this}updateTheme(e){e===o.LogTheme.Dark?(this._contextStyle="color: #00AAFF;",this._msgStyle="color: #FFFFFF;"):(this._contextStyle="color: #00008B;",this._msgStyle="color: #000;")}sendMessage(e){if(!this._enabled)return;const t=this._formatter(e);switch(e.type){case o.LogLevelType.Verbose:i.log(t,this._contextStyle,this._msgStyle);break;case o.LogLevelType.Debug:i.debug(t,this._contextStyle,this._msgStyle);break;case o.LogLevelType.Info:i.info(t,this._contextStyle,this._msgStyle);break;case o.LogLevelType.Warn:i.warn(t,this._contextStyle,this._msgStyle);break;case o.LogLevelType.Error:i.error(t,this._contextStyle,this._msgStyle)}}}},7553:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogEventTarget=void 0;const r=n(7263),o=n(2233);t.LogEventTarget=class{constructor(e){this._events=e}detach(){this._events=void 0}init(e){return this._options=e,this}updateTheme(e){}sendMessage(e){if(!this._events)return;const t={[r.LogLevelType.Debug]:o.LogEventType.Debug,[r.LogLevelType.Info]:o.LogEventType.Info,[r.LogLevelType.Verbose]:o.LogEventType.Verbose,[r.LogLevelType.Warn]:o.LogEventType.Warning,[r.LogLevelType.Error]:o.LogEventType.Error}[e.type];t?this._events[t].dispatch({entry:e}):i.warn("[sendMessage] No event could be matched for log entry: ",e)}}},8909:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6527:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(8909),t),i(n(7081),t),i(n(7553),t)},7675:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7636:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5513:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Signal=void 0;const r=n(4859),o=n(4890);t.Signal=class{constructor(e){this._context=e,this._bindings=new r.LinkedList}get context(){return this._context}listen(e,t){const n=(0,o.createBindingForHandler)({signal:this,handler:e,once:!1,onDetached:()=>{this._bindings.remove(n)},context:t||this._context});return this._bindings.add(n),n}once(e,t){const n=(0,o.createBindingForHandler)({signal:this,handler:e,once:!0,onDetached:()=>{this._bindings.remove(n)},context:t||this._context});return this._bindings.add(n),n}dispatch(e){this._bindings.iterator().forEach((t=>{t.once&&t.detach();try{t.handler(e)}catch(e){try{i.error("[dispatch] An error occured (dev-mode only): ",e)}catch(e){}}}))}has(e){return this._bindings.iterator().filter((t=>t===e)).length>0}count(){return this._bindings.length}unlisten(e){e.detach()}unlistenAll(){this._bindings.iterator().forEach((e=>this.unlisten(e)))}}},7333:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignalBinding=void 0,t.SignalBinding=class{constructor(e,t=!1){this.owner=null,this.once=t,this._handler=e,this._detachedHandlers=[]}get handler(){return this._handler}detach(){return null!==this.owner&&(this._detachedHandlers.forEach((e=>{e()})),this._detachedHandlers.length=0,!0)}onDetached(e){this._detachedHandlers.push(e)}}},4890:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createBindingForHandler=void 0;const r=n(7333);t.createBindingForHandler=function(e){const{context:t,signal:n,once:i,onDetached:o}=e;let{handler:a}=e;t&&(a=a.bind(t));const s=new r.SignalBinding(a);return"function"==typeof o&&s.onDetached(o),s.owner=n,s.once=i,s}},9046:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9034:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(7675),t),i(n(7636),t),i(n(5513),t),i(n(7333),t),i(n(4890),t),i(n(9046),t)},5347:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoOpSpotlightClient=void 0,t.NoOpSpotlightClient=class{init(){}send(e){}dispose(){}}},1608:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SpotlightBroker=void 0;const i=n(3526),o=n(2843),a=n(9365),s=n(8953),u=n(7207),c=r(n(369)),l=e=>{try{return JSON.stringify(e)}catch(e){return""}};var d,_;!function(e){e[e.SLEEPING=0]="SLEEPING",e[e.INITING=1]="INITING",e[e.WORKING=2]="WORKING",e[e.DEAD=3]="DEAD"}(d||(d={})),function(e){e[e.EMPTY_EVENT_QUEUE=0]="EMPTY_EVENT_QUEUE",e[e.NO_CLIENTS=1]="NO_CLIENTS",e[e.SERVICE_FAILURE=2]="SERVICE_FAILURE",e[e.DISPOSE=3]="DISPOSE"}(_||(_={}));const f="https://spotlight.ngtv.io",h={serviceUrl:f,lazyInit:!0,helloRetries:3,batchRetries:5};class p{static getBroker(e){const{appId:t,serviceUrl:n=f}=e,r=`${t}::${n}`;return p.brokers[r]||(p.brokers[r]=new p(e))}static createClient(e){const t=Object.assign({},h,e);return p.getBroker(t).createClient(t)}static disposeAll(){Object.values(p.brokers).forEach((e=>e.dispose()))}constructor(e){this._clients=[],this._inited=!1,this._initTime=0,this._events=[],this._helloAttempts=0,this._batchAttempts=0,this._lastBatchAttemptTime=0,this._serviceConfig=new s.SpotlightServiceConfigManager,this._state=d.SLEEPING,this._config=e;const{serviceUrl:t=f}=this._config;this._helloUrl=`${t}/hello`,this._batchUrl=`${t}/batch`}createClient(e){const t=new o.SpotlightClient(this,e);return this._clients.push(t),t}init(){this._inited||this._isDead()||(u.SpotlightLogger.debug("Broker:init - manually and explicitly init()ed"),this._hello())}_isServiceConfigStale(){return(Date.now()-this._initTime)/1e3>5*this._serviceConfig.helloPingInterval}queue(e){if(this._isDead())return;u.SpotlightLogger.debug(`Broker:queue - ${l(e)}`),this._isSleeping()&&(this._inited?this._isServiceConfigStale()&&(u.SpotlightLogger.debug("Broker:queue - service config has grown stale, re-hello-ing"),this._hello()):this._config.lazyInit?(u.SpotlightLogger.debug("Broker:queue - lazy-initing now that a message is queued"),this._hello()):u.SpotlightLogger.info("Broker:queue - lazy-init disabled; init() must be manually called"));const t=Object.assign({timestamp:Date.now()},e);this._inited&&0===this._events.length&&(u.SpotlightLogger.debug("Broker:queue - re-starting batch timer"),this._restartBatchTimer()),this._events.push(t);const n=this._events.length,r=this._serviceConfig.maxBatchSize;n>=r&&(u.SpotlightLogger.debug(`Broker:queue - event queue (${n}) meets or exceeds maxBatchSize (${r}), batching...`),this._batch())}_hello(){if(this._isDead())return;if(this._isIniting())return void u.SpotlightLogger.debug("Broker:hello - disallowing concurrent hello calls");if(this._config.helloRetries&&this._helloAttempts>this._config.helloRetries)return u.SpotlightLogger.info("Broker:hello - too many retries ... dead"),void this._stop(_.SERVICE_FAILURE);this._state=d.INITING,u.SpotlightLogger.debug("Broker:hello request"),this._helloAttempts+=1;const e=this._serviceConfig.sessionId,t=e?`${this._helloUrl}/${e}`:this._helloUrl;fetch(t,{method:"GET",mode:"cors",headers:{"app-id":this._config.appId,"Content-Type":"application/json",Accept:"application/json"}}).then((e=>e.ok?e.json():Promise.reject(e))).then((e=>{if(!(0,c.default)(e))throw new Error("Spotlight /hello service returned invalid data");if(this._serviceConfig.update(e),!this._serviceConfig.sessionId)throw new Error("Spotlight client requires sessionId from server");u.SpotlightLogger.debug(`Broker:hello response - ${l(this._serviceConfig)}`),this._state=d.WORKING,this._inited=!0,this._initTime=Date.now(),this._helloAttempts=0,this._batch()}),(e=>{u.SpotlightLogger.info(`Broker:hello service error - ${e.status?`${e.status}: ${e.statusText}`:e}`),this._state=d.SLEEPING})).catch((e=>{u.SpotlightLogger.info(`Broker:hello client error - ${e}`),this._state=d.SLEEPING}))}_batch(){if(this._isDead())return;if(this._lastBatchAttemptTime){const e=Math.floor((Date.now()-this._lastBatchAttemptTime)/1e3),{flushInterval:t}=this._serviceConfig;if(ethis._config.batchRetries)return u.SpotlightLogger.info("Broker:batch - too many retries ... dead"),void this._stop(_.SERVICE_FAILURE);const e=this._filterEvents(this._events.splice(0,this._serviceConfig.maxBatchSize));0!==e.length?(this._inited&&this._isSleeping()&&(u.SpotlightLogger.debug("Broker:batch - restarting hello"),this._restartHelloTimer()),this._batchAttempts+=1,this._lastBatchAttemptTime=Date.now(),this._postEvents(e).then((()=>{u.SpotlightLogger.debug("Broker:batch response - success!"),this._batchAttempts=0,this._lastBatchAttemptTime=0}),(t=>{u.SpotlightLogger.info(`Broker:batch service error - ${t.status?`${t.status}: ${t.statusText}`:t}`),t.status>=500&&this._events.splice(0,0,...e),this._queueServiceError(t.clone())})).catch((e=>{u.SpotlightLogger.info(`Broker:batch client error - ${e}`)})).finally((()=>{this._restartBatchTimer()}))):u.SpotlightLogger.debug("Broker:batch filtered out all events, nothing to POST")}_queueServiceError(e){var t,n;const r={},o={timestamp:Date.now(),type:"spotlight",category:i.SpotlightEventCategory.ERROR,level:i.SpotlightEventLevel.CRITICAL,source:"spotlight",data:r};if(e instanceof Response){const i=[];null===(n=(t=e.headers).forEach)||void 0===n||n.call(t,((e,t)=>i.push([t,e])));const o={res_headers:i.map((([e,t])=>`${e}=${t}`)).join(","),res_ok:e.ok,res_redirected:e.redirected,res_status:e.status,res_statusText:e.statusText,res_type:e.type,res_url:e.url};Object.assign(r,o)}else r.error_message=String(e);this._events.splice(0,0,o)}_filterEvents(e){return e.filter(this._serviceConfig.filterEvent)}_postEvents(e){u.SpotlightLogger.debug(`Broker:_postEvents - ${l(e)}`);const t={sessionId:this._serviceConfig.sessionId,events:e};return fetch(this._batchUrl,{method:"POST",mode:"cors",headers:{"app-id":this._config.appId,"Content-Type":"application/json",Accept:"application/json"},body:l(t)}).then((e=>e.ok?e:Promise.reject(e)))}detachClient(e){const t=this._clients.findIndex((t=>t===e));-1!==t&&this._clients.splice(t,1),0===this._clients.length&&(this._stop(_.NO_CLIENTS),this._flush())}_stop(e){var t,n;u.SpotlightLogger.debug(`Broker:_stop - reason: ${_[e]}`),null===(t=this._helloTimer)||void 0===t||t.stop(),e!==_.NO_CLIENTS&&(null===(n=this._batchTimer)||void 0===n||n.stop()),this._state=e===_.SERVICE_FAILURE||e===_.DISPOSE?d.DEAD:d.SLEEPING}dispose(){this._stop(_.DISPOSE),this._clients.forEach((e=>e.dispose()))}_flush(){if(this._inited&&this._events.length>0){const e=this._filterEvents(this._events.splice(0,this._serviceConfig.maxBatchSize));e.length>0&&(u.SpotlightLogger.debug(`Broker:_flush - ${l(e)}`),this._postEvents(e))}}_restartHelloTimer(){var e;if(this._isDead())return;const t=this._serviceConfig.helloPingInterval;u.SpotlightLogger.debug(`Broker:_restartHelloTimer - interval hello ping: ${t} seconds`),null===(e=this._helloTimer)||void 0===e||e.stop();const n=this._hello.bind(this);this._helloTimer=(0,a.Timer)(a.TimerMode.Timeout,n,1e3*t),this._helloTimer.start()}_restartBatchTimer(){var e;if(this._isDead())return;const t=this._serviceConfig.flushInterval;u.SpotlightLogger.debug(`Broker:_restartBatchTimer - interval batching: ${t} seconds`),null===(e=this._batchTimer)||void 0===e||e.stop();const n=this._batch.bind(this);this._batchTimer=(0,a.Timer)(a.TimerMode.Timeout,n,1e3*t),this._batchTimer.start()}_isSleeping(){return this._state===d.SLEEPING}_isIniting(){return this._state===d.INITING}_isDead(){return this._state===d.DEAD}}t.SpotlightBroker=p,p.brokers={}},2843:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SpotlightClient=void 0;const r=n(7207);t.SpotlightClient=class{constructor(e,t){this._broker=e,this._config=t,this._source=this._config.source,this._source||r.SpotlightLogger.warn('Spotlight requires a "source"')}init(){var e;null===(e=this._broker)||void 0===e||e.init()}send(e){var t;const n=Object.assign({},e,{source:this._source});null===(t=this._broker)||void 0===t||t.queue(n)}dispose(){var e;null===(e=this._broker)||void 0===e||e.detachClient(this),this._broker=void 0}}},7207:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SpotlightLogger=void 0;const r=n(6120);t.SpotlightLogger=r.Log.getLogger("Spotlight").filter("spotlight")},8953:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SpotlightServiceConfigManager=void 0;const i=n(3526),o=r(n(5192)),a=r(n(7838)),s=r(n(3701)),u=r(n(3136)),c=n(7207),l={eventTypesAllowed:"*",categoryAllowed:[i.SpotlightEventCategory.ERROR],throttleLevel:[i.SpotlightEventLevel.CRITICAL],maxBatchSize:200,flushInterval:10,helloPingInterval:600};t.SpotlightServiceConfigManager=class{constructor(){this._serviceConfig=Object.assign({},l),this.filterEvent=e=>{if(!e.level)return c.SpotlightLogger.verbose('ServiceConfig - event has no "level"'),!1;if(!e.category)return c.SpotlightLogger.verbose('ServiceConfig - event has no "category"'),!1;if(!e.type)return c.SpotlightLogger.verbose('ServiceConfig - event has no "type"'),!1;if((0,u.default)(this.throttleLevel)){if("*"!==this.throttleLevel&&this.throttleLevel!==e.level)return c.SpotlightLogger.verbose(`ServiceConfig - config "throttleLevel" string value "${this.throttleLevel}" does not allow event level "${e.level}"`),!1}else{if(!(0,a.default)(this.throttleLevel))return c.SpotlightLogger.verbose('ServiceConfig - invalid "throttleLevel" value'),!1;if(0===this.throttleLevel.length)return c.SpotlightLogger.verbose('ServiceConfig - config "throttleLevel" is empty array; no events allowed'),!1;if(!this.throttleLevel.includes(e.level))return c.SpotlightLogger.verbose(`ServiceConfig - config "throttleLevel" does not contain "${e.level}"`),!1}if((0,u.default)(this.categoryAllowed)){if("*"!==this.categoryAllowed&&this.categoryAllowed!==e.category)return c.SpotlightLogger.verbose(`ServiceConfig - config "categoryAllowed" string value "${this.categoryAllowed}" does not allow event category "${e.category}"`),!1}else{if(!(0,a.default)(this.categoryAllowed))return c.SpotlightLogger.verbose('ServiceConfig - invalid "categoryAllowed" value'),!1;if(0===this.categoryAllowed.length)return c.SpotlightLogger.verbose('ServiceConfig - config "categoryAllowed" is empty array; no events allowed'),!1;if(!this.categoryAllowed.includes(e.category))return c.SpotlightLogger.verbose(`ServiceConfig - config "categoryAllowed" does not contain "${e.category}"`),!1}if((0,u.default)(this.eventTypesAllowed)){if("*"!==this.eventTypesAllowed&&this.eventTypesAllowed!==e.type)return c.SpotlightLogger.verbose(`ServiceConfig - config "eventTypesAllowed" string value "${this.eventTypesAllowed}" does not allow event type "${e.type}"`),!1}else{if(!(0,a.default)(this.eventTypesAllowed))return c.SpotlightLogger.verbose('ServiceConfig - invalid "eventTypesAllowed" value'),!1;if(0===this.eventTypesAllowed.length)return c.SpotlightLogger.verbose('ServiceConfig - config "eventTypesAllowed" is empty array; no events allowed'),!1;if(!this.eventTypesAllowed.includes(e.type))return c.SpotlightLogger.verbose(`ServiceConfig - config "eventTypesAllowed" does not contain "${e.type}"`),!1}return!0}}update(e){const t=Object.assign(this._serviceConfig,e);(0,s.default)(t.maxBatchSize)||(t.maxBatchSize=l.maxBatchSize),t.maxBatchSize=(0,o.default)(t.maxBatchSize,5),(0,s.default)(t.flushInterval)||(t.flushInterval=l.flushInterval),t.flushInterval=(0,o.default)(t.flushInterval,5,900),(0,s.default)(t.helloPingInterval)||(t.helloPingInterval=l.helloPingInterval),t.helloPingInterval=(0,o.default)(t.helloPingInterval,this.flushInterval+10,1800),(0,u.default)(t.eventTypesAllowed)||(0,a.default)(t.eventTypesAllowed)||(t.eventTypesAllowed=l.eventTypesAllowed),(0,u.default)(t.categoryAllowed)||(0,a.default)(t.categoryAllowed)||(t.categoryAllowed=l.categoryAllowed),(0,u.default)(t.throttleLevel)||(0,a.default)(t.throttleLevel)||(t.throttleLevel=l.throttleLevel),this._serviceConfig=t}get sessionId(){return this._serviceConfig.sessionId}get eventTypesAllowed(){var e;return null!==(e=this._serviceConfig.eventTypesAllowed)&&void 0!==e?e:l.eventTypesAllowed}get categoryAllowed(){var e;return null!==(e=this._serviceConfig.categoryAllowed)&&void 0!==e?e:l.categoryAllowed}get throttleLevel(){var e;return null!==(e=this._serviceConfig.throttleLevel)&&void 0!==e?e:l.throttleLevel}get maxBatchSize(){var e;return null!==(e=this._serviceConfig.maxBatchSize)&&void 0!==e?e:l.maxBatchSize}get flushInterval(){var e;return null!==(e=this._serviceConfig.flushInterval)&&void 0!==e?e:l.flushInterval}get helloPingInterval(){var e;return null!==(e=this._serviceConfig.helloPingInterval)&&void 0!==e?e:l.helloPingInterval}}},3526:(e,t)=>{"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.SpotlightEventLevel=t.SpotlightEventCategory=void 0,function(e){e.METADATA="metadata",e.ERROR="error",e.QOS="qos"}(n||(t.SpotlightEventCategory=n={})),function(e){e.INFO="info",e.WARN="warn",e.ERROR="error",e.CRITICAL="critical"}(r||(t.SpotlightEventLevel=r={}))},2702:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SpotlightWrapper=t.SpotlightWrapperInitBehavior=void 0;const i=n(3526),o=n(6120),a=n(4079),s=r(n(3136)),u=r(n(2701));var c;!function(e){e.ASAP="asap",e.LAZY="lazy",e.MANUAL="manual"}(c||(t.SpotlightWrapperInitBehavior=c={}));const l=c.ASAP;class d{constructor(e="undefined"){this._source=e,this._events=[],this.send=this.send.bind(this)}setup(e="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJuZXR3b3JrIjoid20iLCJwcm9kdWN0IjoidG9wMi1zcG90bGlnaHQiLCJwbGF0Zm9ybSI6ImFsbCIsImFwcElkIjoid20tdG9wMi1zcG90bGlnaHQtYWxsLWxjazEwaiJ9.lUF1PCwVzp5xELQA-l_GVNtMY9N22y5kicSH4ffbljM",t=l){const n={appId:e,source:this._source,lazyInit:t!==c.MANUAL};this._spotlightClient=a.Spotlight.getClient(n),t===c.ASAP&&this.init(),this._events.length&&this._flush()}init(){this._spotlightClient?this._spotlightClient.init():d._logger.warn("init() was called before the SpotlightWrapper was setup()")}send(e){e&&(this._spotlightClient?this._spotlightClient.send(e):this._events.push(e))}_flush(){this._events.splice(0).forEach(this.send)}sendVersion(e){const t={version:String(e)},n={type:"init",level:i.SpotlightEventLevel.CRITICAL,category:i.SpotlightEventCategory.METADATA,data:t};this.send(n)}sendError(e,t="error",n=i.SpotlightEventLevel.WARN){const r=(0,s.default)(e)?{error:e}:(0,u.default)(e)?Object.assign({},e):{},o={type:t,level:n,category:i.SpotlightEventCategory.ERROR,data:r};this.send(o)}dispose(){this._spotlightClient&&(this._spotlightClient.dispose(),this._spotlightClient=void 0)}}t.SpotlightWrapper=d,d._logger=o.Log.getLogger("SpotlightWrapper")},4079:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SpotlightEventLevel=t.SpotlightEventCategory=t.Spotlight=t.SpotlightWrapperInitBehavior=t.SpotlightWrapper=void 0;const i=n(3526);Object.defineProperty(t,"SpotlightEventCategory",{enumerable:!0,get:function(){return i.SpotlightEventCategory}}),Object.defineProperty(t,"SpotlightEventLevel",{enumerable:!0,get:function(){return i.SpotlightEventLevel}});const o=n(1608),a=n(5347),s=n(7207),u=n(2702);Object.defineProperty(t,"SpotlightWrapper",{enumerable:!0,get:function(){return u.SpotlightWrapper}}),Object.defineProperty(t,"SpotlightWrapperInitBehavior",{enumerable:!0,get:function(){return u.SpotlightWrapperInitBehavior}});const c=r(n(369)),l={getClient:e=>{try{if(!e||!c.default)throw new TypeError("Requires a SpotlightConfig param");const{appId:t,source:n}=e;if(!t)throw new TypeError('SpotlightConfig requires "appId"');if(!n)throw new TypeError('SpotlightConfig requires "source"');return o.SpotlightBroker.createClient(e)}catch(e){return s.SpotlightLogger.warn(`Spotlight.getClient failure: ${e}`),new a.NoOpSpotlightClient}},dispose:()=>{o.SpotlightBroker.disposeAll()}};t.Spotlight=l},4873:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultTask=void 0;const r=n(5665);class i extends r.Task{constructor(e){super(),this._taskHandler=e}map(e){return new i((t=>{this.fold((e=>t.reject(e)),(n=>{try{const r=e(n);t.resolve(r)}catch(e){t.reject(e)}}))})).onExecuted((()=>{this.execute()}))}mapAsync(e){return new i((t=>{this.fold((e=>t.reject(e)),(n=>{try{e(n).then((e=>{t.resolve(e)})).catch((e=>{t.reject(e)}))}catch(e){t.reject(e)}}))})).onExecuted((()=>{this.execute()}))}mapLeft(e){return new i((t=>{this.fold((n=>{try{const r=e(n);t.reject(r)}catch(e){t.reject(e)}}),(e=>t.resolve(e)))})).onExecuted((()=>{this.execute()}))}pipe(e){return new i((t=>{this.fold(t.reject,(n=>{e(n).execute().fold((e=>t.reject(e)),(e=>t.resolve(e)))}))})).onExecuted((()=>{this.execute()}))}chain(e){return new i((t=>{this.fold((e=>{t.reject(e)}),(n=>{e.execute().fold((e=>{t.reject(e)}),(e=>{Array.isArray(n)?(n.push(e),t.resolve(n)):t.resolve([n,e])}))}))})).onExecuted((()=>{this.execute()}))}execute(){return this.running||this.completed||(this._notifyExecuting(),this._taskHandler(this._createResolver())),this}}t.DefaultTask=i},6805:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},611:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isResponse=t.NetworkTask=void 0;const r=n(7883);t.NetworkTask=(e,t)=>r.TaskFactory.create((n=>{fetch(e,t).then((e=>{if(e.ok)return e;throw e})).then((e=>(null==t?void 0:t.passthrough)?e:e.json())).then(n.resolve,n.reject)})),t.isResponse=function(e){return void 0!==e.status}},5665:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Task=void 0;const r=n(8353),i=n(6120),o=n(3914),a=n(7969),s=i.Log.getLogger("Task").filter("lib.tasks");class u{static createTaskId(){return"task-"+u._taskId++}constructor(){this._handleResolved=e=>{if(this.running=!1,this.resolved=!0,this.canceled)return this._handleCanceled();this._value=(0,r.right)(e),this._triggerHandlersFor(a.TaskEventType.Resolved),this._handleCompleted()},this._handleRejected=e=>{if(this.running=!1,this.rejected=!0,this.canceled)return this._handleCanceled();this._value=(0,r.left)(e),this._triggerHandlersFor(a.TaskEventType.Rejected),this._handleCompleted()},this._logger=s,this.id=u.createTaskId(),this._handlers=new Map([[a.TaskEventType.Executed,[]],[a.TaskEventType.Resolved,[]],[a.TaskEventType.Rejected,[]],[a.TaskEventType.Canceled,[]],[a.TaskEventType.Completed,[]]]),this.running=!1,this.canceled=!1,this.resolved=!1,this.rejected=!1,this.completed=!1}onExecuted(e){return this._addHandler(a.TaskEventType.Executed,e),this}onResolved(e){return this._addHandler(a.TaskEventType.Resolved,e),this}onRejected(e){return this._addHandler(a.TaskEventType.Rejected,e),this}onCanceled(e){return this._addHandler(a.TaskEventType.Canceled,e),this}onCompleted(e){return this._addHandler(a.TaskEventType.Completed,e),this}fold(e,t){return this._addHandler(a.TaskEventType.Rejected,e),this._addHandler(a.TaskEventType.Resolved,t),this}cancel(){return this.canceled=!0,this}toOptional(){return this.resolved?(0,r.fromEither)(this._value):r.none}_notifyExecuting(){this.running=!0,this._triggerHandlersFor(a.TaskEventType.Executed)}_createResolver(){return{resolve:this._handleResolved,reject:this._handleRejected}}_handleCanceled(){this._triggerHandlersFor(a.TaskEventType.Canceled),this._handleCompleted()}_handleCompleted(){this.completed=!0,this._triggerHandlersFor(a.TaskEventType.Completed)}_addHandler(e,t){let n=!1;switch(e){case a.TaskEventType.Executed:n=this.running;break;case a.TaskEventType.Resolved:n=this.resolved;break;case a.TaskEventType.Rejected:n=this.rejected;break;case a.TaskEventType.Canceled:n=this.canceled;break;case a.TaskEventType.Completed:n=this.resolved||this.rejected||this.canceled;break;default:throw new o.UnreachableCaseError(e)}n?this._triggerHandler(e,t):(0,r.pipe)((0,r.fromNullable)(this._handlers.get(e)),(0,r.map)((e=>e.push(t))))}_triggerHandlersFor(e){var t;const n=null!==(t=this._handlers.get(e))&&void 0!==t?t:[];for(;n.length>0;){const t=n.shift();t&&this._triggerHandler(e,t)}this._handlers.set(e,[])}_triggerHandler(e,t){e===a.TaskEventType.Executed||e===a.TaskEventType.Canceled||e===a.TaskEventType.Completed?t():t(this._value.value)}}t.Task=u,u._taskId=0},7883:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TaskFactory=void 0;const a=o(n(9365)),s=n(4873);class u{static create(e){return new s.DefaultTask(e)}static resolve(e){return u.create((t=>{t.resolve(e)}))}static resolveDelayed(e,t){return u.delay(e,(e=>{e.resolve(t)}))}static reject(e){return u.create((t=>{t.reject(e)}))}static rejectDelayed(e,t){return u.delay(e,(e=>{e.reject(t)}))}static delay(e,t){return u.create((n=>{a.delay(t.bind(null,n),e)}))}static seq(...e){if(0===e.length||void 0===e[0])return u.resolve([]).execute();if(1===e.length)return e[0].map((e=>[e]));let t=e[0];for(let n=1;n{const n={tasks:e.length,resolved:0},r=[...new Array(n.tasks)],i=e=>{t.reject(e)};e.forEach(((e,o)=>{e.onRejected(i),e.onResolved((e=>((e,i)=>{n.resolved++,r[i]=e,n.resolved===n.tasks&&t.resolve(r)})(e,o))),e.running||e.execute()}))})).execute()}}t.TaskFactory=u},7969:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TaskEventType=void 0,function(e){e.Executed="executed",e.Resolved="resolved",e.Rejected="rejected",e.Canceled="canceled",e.Completed="completed"}(n||(t.TaskEventType=n={}))},9909:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(4873),t),i(n(6805),t),i(n(611),t),i(n(5665),t),i(n(7883),t),i(n(7969),t)},9776:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayUtils=void 0;const i=r(n(1637)),o=r(n(4916)),a=r(n(1947)),s=n(6276);t.ArrayUtils=class{static remove(e,...t){return(0,i.default)(e,...t)}static dedupe(e){return(0,o.default)(e)}static lastIndex(e){return e.length-1}static take(e,t){return e.slice(0,t)}static deepCopy(e){return(0,s.cloneDeep)(e)}static flatten(e){return(0,a.default)(e)}static mapToObj(e,t){const n={};return e.forEach((e=>t(e,n))),n}}},9737:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEnumValues=t.getEnumKeys=void 0;const n=e=>Object.keys(e);t.getEnumKeys=n,t.getEnumValues=e=>n(e).map((t=>e[t]))},6276:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isNull=t.cloneDeep=t.isString=t.isBoolean=t.isFunction=t.isEqual=void 0;const i=r(n(5599)),o=r(n(8246)),a=r(n(9142)),s=r(n(9494)),u=r(n(5e3)),c=r(n(3136));t.isEqual=(e,t)=>(0,i.default)(e,t),t.isFunction=e=>(0,o.default)(e),t.isBoolean=e=>(0,a.default)(e),t.isString=e=>(0,c.default)(e),t.cloneDeep=e=>(0,s.default)(e),t.isNull=e=>(0,u.default)(e)},7161:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRandomInt=void 0,t.getRandomInt=(e=1)=>Math.floor(Math.random()*Math.floor(e))},4614:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUtils=void 0;const i=r(n(7673)),o=r(n(7945)),a=r(n(105)),s=r(n(1117)),u=r(n(6040)),c=r(n(1478)),l=r(n(2701));class d{static assign(e,...t){return(0,i.default)(e,...t)}static extendDeep(e,...t){return(0,o.default)(e,...t)}static extendDeepWithArrayAssignment(e,...t){return(0,a.default)(e,...t,((e,t,n,r,i,o)=>{if(Array.isArray(t))return t}))}static keyValues(e){return Object.keys(e).map((t=>({key:t,value:e[t]})))}static mapValues(e,t){return Object.keys(e).forEach((n=>{const r=d.get(e,n);d.set(e,n,t(n,r))})),e}static keysLike(e,t){return Object.keys(e).filter((e=>t.test(e)))}static getValues(e){return Object.keys(e).map((t=>e[t]))}static isFunc(e){return"function"==typeof e}static isObj(e){return!!e&&(e.constructor&&e.constructor===Object||"object"==typeof e)}static has(e,t){return(0,s.default)(e,t)}static set(e,t,n){(0,c.default)(e,t,n)}static get(e,t,n){return(0,u.default)(e,t,n)}static getOrElse(e,t,n){return d.get(e,t,n)}static isPlainObject(e){return(0,l.default)(e)}static updateValues(e,t){return Object.keys(e).forEach((n=>{const r=e[n],i=t[n];void 0!==t[n]&&(d.isObj(r)?d.updateValues(r,i):e[n]=i)})),e}static filter(e,t){const n=d.extendDeep({},e),r=e=>{Object.keys(e).forEach((n=>{const i=e[n];d.isObj(i)?(r(i),d.isEmpty(i)&&delete e[n]):i!==t&&delete e[n]}))};return r(n),n}static compact(e){return Object.keys(e).forEach((t=>{const n=e[t];d.isObj(n)&&(d.isEmpty(n)||d.compact(n),d.isEmpty(n)&&delete e[t])})),e}static isEmpty(e){return 0===Object.keys(e).length}}t.ObjectUtils=d},6222:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createDeferred=void 0,t.createDeferred=function(){const e={};return e.promise=new Promise(((t,n)=>{e.resolver=t,e.rejector=n})),e}},6664:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.escape=t.split=t.matchedRight=void 0,t.matchedRight=e=>{if("string"!=typeof e.input||"number"!=typeof e.index)return"";const t=e.index+e[0].length;return e.input.substr(t,e.input.length-t)},t.split=(e,t)=>{const n="#__delim__#";return e.replace(t,n).split(n)},t.escape=e=>e.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&")},2870:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.stringify=t.getUniqueId=t.hashCode=t.replaceTokens=void 0;const i=n(4614),o=r(n(3345));t.replaceTokens=(e,t,n)=>{const r=i.ObjectUtils.extendDeep({},{pattern:"{token}"},n||{});return Object.keys(t).forEach((n=>{const i=t[n],o=r.pattern.split("token").join(n);e=e.split(o).join(i)})),e},t.hashCode=e=>{let t,n,r=0;if(0===e.length)return r;for(t=0;t(0,o.default)(e),t.stringify=function(e,t=4,n=2){return JSON.stringify(e,function(e){const t=[];return function(n,r){if(t.length>0){const n=t.indexOf(this);n>-1?t.splice(n+1):t.push(this),t.indexOf(r)>-1?r="[Circular JSON]":t.length>e&&!function(e){return"boolean"==typeof e||"string"==typeof e||"number"==typeof e||null==e}(r)&&(r="...")}else t.push(r);return r}}(t),n)}},8824:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeRange=t.TimeRangeUtils=void 0,t.TimeRangeUtils=class{static greaterThanRange(e,t,n=!0){return e.start==t.start?e.duration>t.duration:n?e.start>=t.end:e.start>t.end}static lessThanRange(e,t,n=!0){return e.start==t.start?e.duration=this.start&&e<=this.end}equals(e){return this.start===e.start&&this.end===e.end}toString(){return`[TimeRange] ${this.start} -> ${this.end} : ${this.duration}`}toJSON(){return{start:this.start,end:this.end,duration:this.duration}}}t.TimeRange=n},9365:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=t.Timer=t.TimerMode=void 0;const r=n(3914);var i;!function(e){e.Timeout="timeout",e.Interval="interval"}(i||(t.TimerMode=i={}));const o=(e,t,n)=>{let o,a,s=-1;switch(e){case i.Interval:o=()=>{s=setInterval(t,n)},a=()=>{clearInterval(s),s=-1};break;case i.Timeout:o=()=>{s=setTimeout(t,n)},a=()=>{clearTimeout(s),s=-1};break;default:throw new r.UnreachableCaseError(e)}return{start:o,stop:a}};t.Timer=o,t.delay=(e,t=0)=>{const n=o(i.Timeout,e,t);return n.start(),n}},6798:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},893:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.containsEnabledTOPDebug=t.getQueryAsMap=t.appendQuery=t.normalizeHTTPProtocol=t.directory=t.extension=t.parse=void 0;const i=r(n(899));function o(e){return(0,i.default)(e,!0)}t.parse=o,t.extension=function(e){const t=(0,i.default)(e);return t.pathname.substring(t.pathname.lastIndexOf(".")+1,t.pathname.length)},t.directory=function(e){const t=(0,i.default)(e);return t.pathname.substr(0,t.pathname.lastIndexOf("/")+1)};const a=/^(https?\:)/;function s(e){return(0,i.default)(e,!0).query}t.normalizeHTTPProtocol=function(e){return e.replace(a,"")},t.appendQuery=function(e,t){const n=o(e);return n.set("query",Object.assign(Object.assign({},n.query),t)),n.toString()},t.getQueryAsMap=s,t.containsEnabledTOPDebug=function(e){const t=s(e).topdebug;return!!t&&/^true/.test(t)}},6631:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(9776),t),i(n(9737),t),i(n(6276),t),i(n(7161),t),i(n(4614),t),i(n(6222),t),i(n(6664),t),i(n(2870),t),i(n(8824),t),i(n(9365),t),i(n(6798),t),i(n(893),t)},899:(e,t,r)=>{"use strict";var i=r(3096),o=r(8157),a=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,s=/[\n\r\t]/g,u=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,c=/:\d+$/,l=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,d=/^[a-zA-Z]:/;function _(e){return(e||"").toString().replace(a,"")}var f=[["#","hash"],["?","query"],function(e,t){return g(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],h={hash:1,query:1};function p(e){var t,r=("undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).location||{},i={},o=typeof(e=e||r);if("blob:"===e.protocol)i=new m(unescape(e.pathname),{});else if("string"===o)for(t in i=new m(e,{}),h)delete i[t];else if("object"===o){for(t in e)t in h||(i[t]=e[t]);void 0===i.slashes&&(i.slashes=u.test(e.href))}return i}function g(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function v(e,t){e=(e=_(e)).replace(s,""),t=t||{};var n,r=l.exec(e),i=r[1]?r[1].toLowerCase():"",o=!!r[2],a=!!r[3],u=0;return o?a?(n=r[2]+r[3]+r[4],u=r[2].length+r[3].length):(n=r[2]+r[4],u=r[2].length):a?(n=r[3]+r[4],u=r[3].length):n=r[4],"file:"===i?u>=2&&(n=n.slice(2)):g(i)?n=r[4]:i?o&&(n=n.slice(2)):u>=2&&g(t.protocol)&&(n=r[4]),{protocol:i,slashes:o||g(i),slashesCount:u,rest:n}}function m(e,t,n){if(e=(e=_(e)).replace(s,""),!(this instanceof m))return new m(e,t,n);var r,a,u,c,l,h,y=f.slice(),b=typeof t,S=this,E=0;for("object"!==b&&"string"!==b&&(n=t,t=null),n&&"function"!=typeof n&&(n=o.parse),r=!(a=v(e||"",t=p(t))).protocol&&!a.slashes,S.slashes=a.slashes||r&&t.slashes,S.protocol=a.protocol||t.protocol||"",e=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||d.test(e))||!a.slashes&&(a.protocol||a.slashesCount<2||!g(S.protocol)))&&(y[3]=[/(.*)/,"pathname"]);E{"use strict";n.d(t,{Z:()=>s});var r=n(8916);const i=function(e,t){for(var n=e.length;n--;)if((0,r.Z)(e[n][0],t))return n;return-1};var o=Array.prototype.splice;function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1},a.prototype.set=function(e,t){var n=this.__data__,r=i(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const s=a},6462:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(3203),i=n(7659);const o=(0,r.Z)(i.Z,"Map")},3026:(e,t,n)=>{"use strict";n.d(t,{Z:()=>_});const r=(0,n(3203).Z)(Object,"create");var i=Object.prototype.hasOwnProperty,o=Object.prototype.hasOwnProperty;function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{"use strict";n.d(t,{Z:()=>o});var r=n(3203),i=n(7659);const o=(0,r.Z)(i.Z,"Set")},8484:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(3026);function i(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r.Z;++t{"use strict";n.d(t,{Z:()=>s});var r=n(1588),i=n(6462),o=n(3026);function a(e){var t=this.__data__=new r.Z(e);this.size=t.size}a.prototype.clear=function(){this.__data__=new r.Z,this.size=0},a.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},a.prototype.get=function(e){return this.__data__.get(e)},a.prototype.has=function(e){return this.__data__.has(e)},a.prototype.set=function(e,t){var n=this.__data__;if(n instanceof r.Z){var a=n.__data__;if(!i.Z||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o.Z(a)}return n.set(e,t),this.size=n.size,this};const s=a},9e3:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(7659).Z.Symbol},6421:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(7659).Z.Uint8Array},1279:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(3857),i=n(7838),o=n(1261),a=n(2916),s=n(4902),u=Object.prototype.hasOwnProperty;const c=function(e,t){var n=(0,i.default)(e),c=!n&&(0,r.Z)(e),l=!n&&!c&&(0,o.Z)(e),d=!n&&!c&&!l&&(0,s.Z)(e),_=n||c||l||d,f=_?function(e,t){for(var n=-1,r=Array(e);++n{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){for(var n=-1,r=t.length,i=e.length;++n{"use strict";n.d(t,{Z:()=>a});var r=n(541),i=n(8916),o=Object.prototype.hasOwnProperty;const a=function(e,t,n){var a=e[t];o.call(e,t)&&(0,i.Z)(a,n)&&(void 0!==n||t in e)||(0,r.Z)(e,t,n)}},541:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(2452);const i=function(e,t,n){"__proto__"==t&&r.Z?(0,r.Z)(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},5976:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(7891),i=n(7838);const o=function(e,t,n){var o=t(e);return(0,i.default)(e)?o:(0,r.Z)(o,n(e))}},4029:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9e3),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r.Z?r.Z.toStringTag:void 0,u=Object.prototype.toString,c=r.Z?r.Z.toStringTag:void 0;const l=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":c&&c in Object(e)?function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var i=a.call(e);return r&&(t?e[s]=n:delete e[s]),i}(e):function(e){return u.call(e)}(e)}},2722:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const r=function(e){return e!=e},i=function(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r{"use strict";n.d(t,{Z:()=>T});var r=n(6757),i=n(541),o=n(8916);const a=function(e,t,n){(void 0!==n&&!(0,o.Z)(e[t],n)||void 0===n&&!(t in e))&&(0,i.Z)(e,t,n)};var s=n(3999),u=n(4763),c=n(8058),l=n(3736),d=n(3857),_=n(7838),f=n(9458),h=n(8742),p=n(1261),g=n(8246),v=n(369),m=n(2701),y=n(4902);const b=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};var S=n(6518),E=n(2742);const $=function(e,t,n,r,i,o,$){var T,A=b(e,n),C=b(t,n),P=$.get(C);if(P)a(e,n,P);else{var I=o?o(A,C,n+"",e,t,$):void 0,w=void 0===I;if(w){var M=(0,_.default)(C),k=!M&&(0,p.Z)(C),O=!M&&!k&&(0,y.Z)(C);I=C,M||k||O?(0,_.default)(A)?I=A:(T=A,(0,h.Z)(T)&&(0,f.Z)(T)?I=(0,c.Z)(A):k?(w=!1,I=(0,s.Z)(C,!0)):O?(w=!1,I=(0,u.Z)(C,!0)):I=[]):(0,m.default)(C)||(0,d.Z)(C)?(I=A,(0,d.Z)(A)?I=function(e){return(0,S.Z)(e,(0,E.Z)(e))}(A):(0,v.default)(A)&&!(0,g.default)(A)||(I=(0,l.Z)(C))):w=!1}w&&($.set(C,I),i(I,C,r,o,$),$.delete(C)),a(e,n,I)}},T=function e(t,n,i,o,s){t!==n&&function(e,t,n){for(var r=-1,i=Object(e),o=n(e),a=o.length;a--;){var s=o[++r];if(!1===t(i[s],s))break}}(n,(function(u,c){if(s||(s=new r.Z),(0,v.default)(u))$(t,n,c,i,e,o,s);else{var l=o?o(b(t,c),u,c+"",t,n,s):void 0;void 0===l&&(l=u),a(t,c,l)}}),E.Z)}},8052:(e,t,n)=>{"use strict";n.d(t,{Z:()=>_});const r=function(e){return e};var i=Math.max,o=n(2452);const a=o.Z?function(e,t){return(0,o.Z)(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:r;var s=Date.now;const u=(c=a,l=0,d=0,function(){var e=s(),t=16-(e-d);if(d=e,t>0){if(++l>=800)return arguments[0]}else l=0;return c.apply(void 0,arguments)});var c,l,d;const _=function(e,t){return u(function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,a=i(r.length-t,0),s=Array(a);++o{"use strict";n.d(t,{Z:()=>r});const r=function(e){return function(t){return e(t)}}},8923:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){return e.has(t)}},971:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(7838),i=n(4878),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/,s=n(3026);function u(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(u.Cache||s.Z),n}u.Cache=s.Z;var c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l=/\\(\\)?/g;const d=(_=u((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(c,(function(e,n,r,i){t.push(r?i.replace(l,"$1"):n||e)})),t}),(function(e){return 500===f.size&&f.clear(),e})),f=_.cache,_);var _,f,h=n(1189);const p=function(e,t){return(0,r.default)(e)?e:function(e,t){if((0,r.default)(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!(0,i.Z)(e))||a.test(e)||!o.test(e)||null!=t&&e in Object(t)}(e,t)?[e]:d((0,h.Z)(e))}},6840:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(6421);const i=function(e){var t=new e.constructor(e.byteLength);return new r.Z(t).set(new r.Z(e)),t}},3999:(n,r,i)=>{"use strict";i.d(r,{Z:()=>l});var o=i(7659),a=t&&!t.nodeType&&t,s=a&&e&&!e.nodeType&&e,u=s&&s.exports===a?o.Z.Buffer:void 0,c=u?u.allocUnsafe:void 0;const l=function(e,t){if(t)return e.slice();var n=e.length,r=c?c(n):new e.constructor(n);return e.copy(r),r}},4763:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(6840);const i=function(e,t){var n=t?(0,r.Z)(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},8058:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n{"use strict";n.d(t,{Z:()=>o});var r=n(4424),i=n(541);const o=function(e,t,n,o){var a=!n;n||(n={});for(var s=-1,u=t.length;++s{"use strict";n.d(t,{Z:()=>u});var r=n(8052),i=n(8916),o=n(9458),a=n(2916),s=n(369);const u=function(e){return(0,r.Z)((function(t,n){var r=-1,u=n.length,c=u>1?n[u-1]:void 0,l=u>2?n[2]:void 0;for(c=e.length>3&&"function"==typeof c?(u--,c):void 0,l&&function(e,t,n){if(!(0,s.default)(n))return!1;var r=typeof t;return!!("number"==r?(0,o.Z)(n)&&(0,a.Z)(t,n.length):"string"==r&&t in n)&&(0,i.Z)(n[t],e)}(n[0],n[1],l)&&(c=u<3?void 0:c,u=1),t=Object(t);++r{"use strict";n.d(t,{Z:()=>i});var r=n(3203);const i=function(){try{var e=(0,r.Z)(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},8055:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});const i="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g},2879:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5976),i=n(1256),o=n(7805);const a=function(e){return(0,r.Z)(e,o.Z,i.Z)}},3203:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(8246);const i=n(7659).Z["__core-js_shared__"];var o,a=(o=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"",s=n(369),u=n(4549),c=/^\[object .+?Constructor\]$/,l=Function.prototype,d=Object.prototype,_=l.toString,f=d.hasOwnProperty,h=RegExp("^"+_.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const p=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!(0,s.default)(e)||(t=e,a&&a in t))&&((0,r.default)(e)?h:c).test((0,u.Z)(e));var t}(n)?n:void 0}},9773:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(0,n(4068).Z)(Object.getPrototypeOf,Object)},1256:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(3464),i=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols;const a=o?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n{"use strict";n.d(t,{Z:()=>$});var r=n(3203),i=n(7659);const o=(0,r.Z)(i.Z,"DataView");var a=n(6462);const s=(0,r.Z)(i.Z,"Promise");var u=n(9228);const c=(0,r.Z)(i.Z,"WeakMap");var l=n(4029),d=n(4549),_="[object Map]",f="[object Promise]",h="[object Set]",p="[object WeakMap]",g="[object DataView]",v=(0,d.Z)(o),m=(0,d.Z)(a.Z),y=(0,d.Z)(s),b=(0,d.Z)(u.Z),S=(0,d.Z)(c),E=l.Z;(o&&E(new o(new ArrayBuffer(1)))!=g||a.Z&&E(new a.Z)!=_||s&&E(s.resolve())!=f||u.Z&&E(new u.Z)!=h||c&&E(new c)!=p)&&(E=function(e){var t=(0,l.Z)(e),n="[object Object]"==t?e.constructor:void 0,r=n?(0,d.Z)(n):"";if(r)switch(r){case v:return g;case m:return _;case y:return f;case b:return h;case S:return p}return t});const $=E},3736:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(369),i=Object.create;const o=function(){function e(){}return function(t){if(!(0,r.default)(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var a=n(9773),s=n(4357);const u=function(e){return"function"!=typeof e.constructor||(0,s.Z)(e)?{}:o((0,a.Z)(e))}},2916:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=/^(?:0|[1-9]\d*)$/;const i=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&r.test(e))&&e>-1&&e%1==0&&e{"use strict";n.d(t,{Z:()=>i});var r=Object.prototype;const i=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}},7433:(n,r,i)=>{"use strict";i.d(r,{Z:()=>c});var o=i(8055),a=t&&!t.nodeType&&t,s=a&&e&&!e.nodeType&&e,u=s&&s.exports===a&&o.Z.process;const c=function(){try{return s&&s.require&&s.require("util").types||u&&u.binding&&u.binding("util")}catch(e){}}()},4068:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){return function(n){return e(t(n))}}},7659:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(8055),i="object"==typeof self&&self&&self.Object===Object&&self;const o=r.Z||i||Function("return this")()},877:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},9316:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(4878);const i=function(e){if("string"==typeof e||(0,r.Z)(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},4549:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=Function.prototype.toString;const i=function(e){if(null!=e){try{return r.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7673:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(4424),i=n(6518),o=n(4133),a=n(9458),s=n(4357),u=n(7805),c=Object.prototype.hasOwnProperty;const l=(0,o.Z)((function(e,t){if((0,s.Z)(t)||(0,a.Z)(t))(0,i.Z)(t,(0,u.Z)(t),e);else for(var n in t)c.call(t,n)&&(0,r.Z)(e,n,t[n])}))},5192:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>_});var r=/\s/,i=/^\s+/,o=n(369),a=n(4878),s=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;const d=function(e){if("number"==typeof e)return e;if((0,a.Z)(e))return NaN;if((0,o.default)(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=(0,o.default)(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&r.test(e.charAt(t)););return t}(e)+1).replace(i,""):e}(e);var n=u.test(e);return n||c.test(e)?l(e.slice(2),n?2:8):s.test(e)?NaN:+e},_=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=d(n))==n?n:0),void 0!==t&&(t=(t=d(t))==t?t:0),function(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}(d(e),t,n)}},9494:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>V});var r=n(6757),i=n(4424),o=n(6518),a=n(7805),s=n(2742),u=n(3999),c=n(8058),l=n(1256),d=n(7891),_=n(9773),f=n(3464);const h=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)(0,d.Z)(t,(0,l.Z)(e)),e=(0,_.Z)(e);return t}:f.Z;var p=n(2879),g=n(5976);const v=function(e){return(0,g.Z)(e,s.Z,h)};var m=n(9424),y=Object.prototype.hasOwnProperty,b=n(6840),S=/\w*$/,E=n(9e3),$=E.Z?E.Z.prototype:void 0,T=$?$.valueOf:void 0,A=n(4763);const C=function(e,t,n){var r,i,o,a=e.constructor;switch(t){case"[object ArrayBuffer]":return(0,b.Z)(e);case"[object Boolean]":case"[object Date]":return new a(+e);case"[object DataView]":return function(e,t){var n=t?(0,b.Z)(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return(0,A.Z)(e,n);case"[object Map]":case"[object Set]":return new a;case"[object Number]":case"[object String]":return new a(e);case"[object RegExp]":return(o=new(i=e).constructor(i.source,S.exec(i))).lastIndex=i.lastIndex,o;case"[object Symbol]":return r=e,T?Object(T.call(r)):{}}};var P=n(3736),I=n(7838),w=n(1261),M=n(8742),k=n(2052),O=n(7433),R=O.Z&&O.Z.isMap;const D=R?(0,k.Z)(R):function(e){return(0,M.Z)(e)&&"[object Map]"==(0,m.Z)(e)};var L=n(369),x=O.Z&&O.Z.isSet;const N=x?(0,k.Z)(x):function(e){return(0,M.Z)(e)&&"[object Set]"==(0,m.Z)(e)};var U="[object Arguments]",B="[object Function]",F="[object Object]",j={};j[U]=j["[object Array]"]=j["[object ArrayBuffer]"]=j["[object DataView]"]=j["[object Boolean]"]=j["[object Date]"]=j["[object Float32Array]"]=j["[object Float64Array]"]=j["[object Int8Array]"]=j["[object Int16Array]"]=j["[object Int32Array]"]=j["[object Map]"]=j["[object Number]"]=j[F]=j["[object RegExp]"]=j["[object Set]"]=j["[object String]"]=j["[object Symbol]"]=j["[object Uint8Array]"]=j["[object Uint8ClampedArray]"]=j["[object Uint16Array]"]=j["[object Uint32Array]"]=!0,j["[object Error]"]=j[B]=j["[object WeakMap]"]=!1;const H=function e(t,n,d,_,f,g){var b,S=1&n,E=2&n,$=4&n;if(d&&(b=f?d(t,_,f,g):d(t)),void 0!==b)return b;if(!(0,L.default)(t))return t;var T=(0,I.default)(t);if(T){if(b=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&y.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(t),!S)return(0,c.Z)(t,b)}else{var A=(0,m.Z)(t),M=A==B||"[object GeneratorFunction]"==A;if((0,w.Z)(t))return(0,u.Z)(t,S);if(A==F||A==U||M&&!f){if(b=E||M?{}:(0,P.Z)(t),!S)return E?function(e,t){return(0,o.Z)(e,h(e),t)}(t,function(e,t){return e&&(0,o.Z)(t,(0,s.Z)(t),e)}(b,t)):function(e,t){return(0,o.Z)(e,(0,l.Z)(e),t)}(t,function(e,t){return e&&(0,o.Z)(t,(0,a.Z)(t),e)}(b,t))}else{if(!j[A])return f?t:{};b=C(t,A,S)}}g||(g=new r.Z);var k=g.get(t);if(k)return k;g.set(t,b),N(t)?t.forEach((function(r){b.add(e(r,n,d,r,t,g))})):D(t)&&t.forEach((function(r,i){b.set(i,e(r,n,d,i,t,g))}));var O=$?E?v:p.Z:E?s.Z:a.Z,R=T?void 0:O(t);return function(e,t){for(var n=-1,r=null==e?0:e.length;++n{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){return e===t||e!=e&&t!=t}},1947:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(7891),i=n(9e3),o=n(3857),a=n(7838),s=i.Z?i.Z.isConcatSpreadable:void 0;const u=function(e){return(0,a.default)(e)||(0,o.Z)(e)||!!(s&&e&&e[s])},c=function e(t,n,i,o,a){var s=-1,c=t.length;for(i||(i=u),a||(a=[]);++s0&&i(l)?n>1?e(l,n-1,i,o,a):(0,r.Z)(a,l):o||(a[a.length]=l)}return a},l=function(e){return null!=e&&e.length?c(e,1):[]}},6040:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(971),i=n(9316);const o=function(e,t,n){var o=null==e?void 0:function(e,t){for(var n=0,o=(t=(0,r.Z)(t,e)).length;null!=e&&n{"use strict";n.r(t),n.d(t,{default:()=>d});var r=Object.prototype.hasOwnProperty;const i=function(e,t){return null!=e&&r.call(e,t)};var o=n(971),a=n(3857),s=n(7838),u=n(2916),c=n(7614),l=n(9316);const d=function(e,t){return null!=e&&function(e,t,n){for(var r=-1,i=(t=(0,o.Z)(t,e)).length,d=!1;++r{"use strict";n.d(t,{Z:()=>c});var r=n(4029),i=n(8742);const o=function(e){return(0,i.Z)(e)&&"[object Arguments]"==(0,r.Z)(e)};var a=Object.prototype,s=a.hasOwnProperty,u=a.propertyIsEnumerable;const c=o(function(){return arguments}())?o:function(e){return(0,i.Z)(e)&&s.call(e,"callee")&&!u.call(e,"callee")}},7838:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=Array.isArray},9458:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(8246),i=n(7614);const o=function(e){return null!=e&&(0,i.Z)(e.length)&&!(0,r.default)(e)}},9142:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(4029),i=n(8742);const o=function(e){return!0===e||!1===e||(0,i.Z)(e)&&"[object Boolean]"==(0,r.Z)(e)}},1261:(n,r,i)=>{"use strict";i.d(r,{Z:()=>c});var o=i(7659),a=t&&!t.nodeType&&t,s=a&&e&&!e.nodeType&&e,u=s&&s.exports===a?o.Z.Buffer:void 0;const c=(u?u.isBuffer:void 0)||function(){return!1}},5599:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>I});var r=n(6757),i=n(8484);const o=function(e,t){for(var n=-1,r=null==e?0:e.length;++nl))return!1;var _=u.get(e),f=u.get(t);if(_&&f)return _==t&&f==e;var h=-1,p=!0,g=2&n?new i.Z:void 0;for(u.set(e,t),u.set(t,e);++h{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(4029),i=n(369);const o=function(e){if(!(0,i.default)(e))return!1;var t=(0,r.Z)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},7614:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},5e3:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=function(e){return null===e}},3701:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(4029),i=n(8742);const o=function(e){return"number"==typeof e||(0,i.Z)(e)&&"[object Number]"==(0,r.Z)(e)}},369:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},8742:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return null!=e&&"object"==typeof e}},2701:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(4029),i=n(9773),o=n(8742),a=Function.prototype,s=Object.prototype,u=a.toString,c=s.hasOwnProperty,l=u.call(Object);const d=function(e){if(!(0,o.Z)(e)||"[object Object]"!=(0,r.Z)(e))return!1;var t=(0,i.Z)(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==l}},3136:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(4029),i=n(7838),o=n(8742);const a=function(e){return"string"==typeof e||!(0,i.default)(e)&&(0,o.Z)(e)&&"[object String]"==(0,r.Z)(e)}},4878:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(4029),i=n(8742);const o=function(e){return"symbol"==typeof e||(0,i.Z)(e)&&"[object Symbol]"==(0,r.Z)(e)}},4902:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(4029),i=n(7614),o=n(8742),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;var s=n(2052),u=n(7433),c=u.Z&&u.Z.isTypedArray;const l=c?(0,s.Z)(c):function(e){return(0,o.Z)(e)&&(0,i.Z)(e.length)&&!!a[(0,r.Z)(e)]}},7805:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(1279),i=n(4357);const o=(0,n(4068).Z)(Object.keys,Object);var a=Object.prototype.hasOwnProperty,s=n(9458);const u=function(e){return(0,s.Z)(e)?(0,r.Z)(e):function(e){if(!(0,i.Z)(e))return o(e);var t=[];for(var n in Object(e))a.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}},2742:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(1279),i=n(369),o=n(4357),a=Object.prototype.hasOwnProperty,s=n(9458);const u=function(e){return(0,s.Z)(e)?(0,r.Z)(e,!0):function(e){if(!(0,i.default)(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=(0,o.Z)(e),n=[];for(var r in e)("constructor"!=r||!t&&a.call(e,r))&&n.push(r);return n}(e)}},7945:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(2304);const i=(0,n(4133).Z)((function(e,t,n){(0,r.Z)(e,t,n)}))},105:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(2304);const i=(0,n(4133).Z)((function(e,t,n,i){(0,r.Z)(e,t,n,i)}))},1637:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(8052),i=(n(497),n(2722));n(2052);var o=n(8058),a=Array.prototype.splice;const s=(0,r.Z)((function(e,t){return e&&e.length&&t&&t.length?function(e,t,n,r){var s=i.Z,u=-1,c=t.length,l=e;for(e===t&&(t=(0,o.Z)(t));++u-1;)l!==e&&a.call(l,d,1),a.call(e,d,1);return e}(e,t):e}))},1478:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(4424),i=n(971),o=n(2916),a=n(369),s=n(9316);const u=function(e,t,n){return null==e?e:function(e,t,n,u){if(!(0,a.default)(e))return e;for(var c=-1,l=(t=(0,i.Z)(t,e)).length,d=l-1,_=e;null!=_&&++c{"use strict";n.d(t,{Z:()=>r});const r=function(){return[]}},1189:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9e3),i=n(497),o=n(7838),a=n(4878),s=r.Z?r.Z.prototype:void 0,u=s?s.toString:void 0;const c=function e(t){if("string"==typeof t)return t;if((0,o.default)(t))return(0,i.Z)(t,e)+"";if((0,a.Z)(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},l=function(e){return null==e?"":c(e)}},4916:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(8484),i=n(2722);const o=function(e,t){return!(null==e||!e.length)&&(0,i.Z)(e,t,0)>-1};var a=n(8923),s=n(9228),u=n(877);const c=s.Z&&1/(0,u.Z)(new s.Z([,-0]))[1]==1/0?function(e){return new s.Z(e)}:function(){},l=function(e){return e&&e.length?function(e,t,n){var i=-1,s=o,l=e.length,d=!0,_=[],f=_;if(l>=200){var h=c(e);if(h)return(0,u.Z)(h);d=!1,s=a.Z,f=new r.Z}else f=_;e:for(;++i{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(1189),i=0;const o=function(e){var t=++i;return(0,r.Z)(e)+t}}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e].call(n.exports,n,n.exports,a),n.exports}return a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a(1114)})(),e.exports=r()},38071:(module,exports,__nested_webpack_require_339467__)=>{module=__nested_webpack_require_339467__.nmd(module);var console=__nested_webpack_require_339467__(23716),Buffer=__nested_webpack_require_339467__(41317).lW,t;self,t=function(){return(()=>{var __webpack_modules__={1235:(e,t,n)=>{"use strict";t.__esModule=!0,t.BreakType=t.AdBreak=void 0,t.normalisePosition=l;var r=n(7823),i=n(7995),o=(n(6366),n(8002),n(597));function a(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0){var n=this.adverts[0].getStart()+this.getDuration();t=Math.min(n-e,this.getDuration())}return Math.max(0,t)},s.getStart=function(){return this.startMillis},s.getTrackingMap=function(){return this.trackingMap},s.getTrackingReport=function(e,t){var n=this.trackingMap.get(e);return n&&t&&this.trackingMap.delete(e),n},s.isActive=function(){if(!this.adverts)return!1;for(var e,t=a(this.adverts);!(e=t()).done;)if(e.value.isActive())return!0;return!1},s.isNonLinear=function(){return this.breakType!==c.LINEAR},s.isValid=function(){return this.breakType===c.LINEAR&&-1===this.startMillis?(r.YoLog.e("Linear AdBreak is invalid - start position is unknown"),!1):this.adverts.length>0||this.trackingMap.size>0||this.isPlaceholder()},s.onNonLinearTrackingEvent=function(e){if(this.isNonLinear()){var t=this.getTrackingReport(e,!1);t&&this.broker.fireTrackingReport(t)}else r.YoLog.w("Warning: AdBreak is not nonlinear - can't signal NonLinearTrackingEvent")},s.postParse=function(e){this.broker=e;for(var t,n=this.startMillis,r=a(this.adverts);!(t=r()).done;){var i=t.value;i.setStart(n),n+=i.getDuration(),i.postParse(e)}},s.removeAdvertsFrom=function(e,t){for(var n=0;n{"use strict";t.__esModule=!0,t.AdVerification=void 0;var r=n(7461),i=n(7823),o=n(597),a=n(6670);function s(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0)},u.onVerificationEvent=function(e,t){if(0!==this.listeners.length){var n=Number.isInteger(t);t&&!n&&i.YoLog.w("onVerificationEvent: reason should be an integer.");var o=this.verificationEvents.get(e);if(o){if(n&&t)for(var a,u=s(this.listeners);!(a=u()).done;)(0,a.value)(new r.Event(t));this.broker.fireTrackingReport(o)}}else i.YoLog.w("No event listeners - can't signal VerificationEvent")},u.postParse=function(e,t){this.broker=e,t?this.listeners.push(t):i.YoLog.e("postParse: callback was null")},u.toString=function(){var e="";if(this.verificationEvents.size>0){e+="\n - Verification events:";for(var t,n=s(this.verificationEvents);!(t=n()).done;){var r=t.value;e+="\n "+r[0]+"="+r[1]}}var i="\n--- Ad Verification:\n - Vendor:";i+=this.vendor,i+="\n - Resources:";for(var a,u=s(this.resources);!(a=u()).done;){var c=a.value;i+="\n"+(0,o.toIndentedString)(c)}return i+=e,(i+="\n - VerificationParameters:")+this.parameters},a}(a.VerificationEventHandler);t.AdVerification=l},6366:(e,t,n)=>{"use strict";t.__esModule=!0,t.Advert=void 0;var r=n(862),i=n(7964),o=n(7823),a=n(3755),s=n(50),u=n(597),c=n(7196),l=(n(8710),n(982),n(6464),n(1305),n(6474)),d=n(6646),_=(n(3698),n(9473),n(8002),n(1862));function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0)for(var t,n=f(e);!(t=n()).done;){var r=t.value;r[0],r[1]}};var h=c.prototype;return h.addMacroSubstitution=function(e,t){this.macroSubstitutions.set(e,t)},h.addTrackingScheduleEntry=function(e,t){for(var n=t*this.linearCreative.getDuration();this.trackingSchedule.has(n);)++n;this.trackingSchedule.set(n,e)},h.adjustForEarlyReturn=function(e){var t=e-this.startMillis;this.setDuration(t);for(var n,r=f(this.getTrackingSchedule().keys());!(n=r()).done;){var i=n.value;i>t&&this.removeFromTrackingSchedule(i)}this.earlyReturn=!0},h.clearTrackingSchedule=function(){this.trackingSchedule.clear()},h.containsCreative=function(e){return e instanceof l.LinearCreative?e===this.linearCreative:e instanceof d.NonLinearCreative?this.nonLinearAds.containsCreative(e):e instanceof i.CompanionCreative&&this.companionAds.containsCreative(e)},h.containsIcon=function(e){for(var t,n=f(this.linearCreative.getIndustryIcons());!(t=n()).done;)if(t.value===e)return!0;return!1},h.getAdVerifications=function(){return Object.assign([],this.adVerifications)},h.getAdType=function(){return this.adType},h.getCompanionAds=function(){return this.companionAds},h.getCompanionAdsByType=function(e){return this.companionAds.getCompanionsByType(e)},h.getCompanionRequired=function(){return this.companionAds.getRequired()},h.getDuration=function(){return this.nonLinear?0:this.linearCreative.getDuration()},h.getEnd=function(){return this.startMillis+this.linearCreative.getDuration()},h.getExtensions=function(){return this.extensions},h.getIdentifier=function(){return this.identifier},h.getImpressions=function(e){if(!this.impressions)return null;var t=new _.TrackingReport(this.impressions.trackingEvent,this.impressions.trackingUrls);return e&&(this.impressions=null),t},h.getIndustryIcons=function(){return this.linearCreative.getIndustryIcons()},h.getInteractiveCreative=function(){return this.linearCreative.getInteractiveCreative()},h.isTruncated=function(){return this.earlyReturn},h.getLineage=function(){return this.wrapper},h.getLinearCreative=function(){return this.linearCreative},h.getMacroSubstitutions=function(){return this.macroSubstitutions},h.getMediaIdentifier=function(){return this.mediaIdentifier},h.getNonLinearAds=function(){return this.nonLinearAds},h.getNonLinearCreativesByType=function(e){return this.nonLinearAds.getNonLinearCreativesByType(e)},h.getProperties=function(){return Object.assign([],this.properties)},h.getProperty=function(e){for(var t,n=f(this.properties);!(t=n()).done;){var r=t.value;if(r.getName()===e)return r}return null},h.getProportion=function(e){var t=0,n=e.split("-");if(2!==n.length)o.YoLog.w("Badly formed progress event in VAST/VMAP: "+e),t=-1;else if(-1!==n[1].indexOf("%")){var r=parseFloat(n[1].substring(0,n[1].length-1));(t=r?r/100:-1)<0&&o.YoLog.w("Badly formed percentage string in VAST/VMAP: "+n[1])}else t=parseFloat((0,a.timeStringToMillis)(n[1],-1)/this.linearCreative.getDuration());return t},h.getRemainingTime=function(e){var t=this.startMillis+this.linearCreative.getDuration(),n=Math.min(t-e,this.linearCreative.getDuration());return Math.max(0,n)},h.getSequence=function(){return this.sequence},h.getSkipOffset=function(){return this.linearCreative.getSkipOffset()},h.getStart=function(){return this.startMillis},h.getTrackingReports=function(e){var t=[],n=this.linearCreative.getTrackingReport(e);return n&&t.push(n),(n=this.nonLinearAds.getTrackingReport(e))&&t.push(n),t},h.getTrackingReportLinear=function(e){if(this.linearCreative)return this.linearCreative.getTrackingReport(e)},h.getTrackingReportNonLinear=function(e){if(this.nonLinearAds)return this.nonLinearAds.getTrackingReport(e)},h.getTrackingSchedule=function(){return this.trackingSchedule},h.getViewableImpressions=function(){return this.viewableImpressions},h.isActive=function(){return this.active},h.isFiller=function(){return this.filler},h.isNonLinear=function(){return this.nonLinear},h.isValid=function(){return this.nonLinear?!this.linearCreative:!(0,u.isNullOrEmpty)(this.mediaIdentifier)&&null!==this.linearCreative},h.onErrorEvent=function(e){this.errors&&(e&&this.addMacroSubstitution("ERRORCODE",e.toString()),this.broker.fireTrackingReport(this.errors))},h.onImpressionEvent=function(){if(this.nonLinear){var e=this.getImpressions(!1);e&&this.broker.fireTrackingReport(e)}else o.YoLog.w("Warning: Advert is not nonlinear - can't signal ImpressionEvent")},h.onViewableEvent=function(e){var t=c.viewableEventMap.get(e),n=this.viewableImpressions.get(t);n&&this.broker.fireTrackingReport(n)},h.postParse=function(e){var t=this;if(this.broker=e,!this.nonLinear){this.addTrackingScheduleEntry("loaded",0),this.addTrackingScheduleEntry("start",0),this.addTrackingScheduleEntry("firstQuartile",.25),this.addTrackingScheduleEntry("midpoint",.5),this.addTrackingScheduleEntry("thirdQuartile",.75),this.addTrackingScheduleEntry("complete",1);for(var n,r=f(this.linearCreative.getTrackingMap());!(n=r()).done;){var i=n.value,o=i[0],a=i[1];if(-1!==o.indexOf("progress")){var s=this.getProportion(o,a);s>=0&&this.addTrackingScheduleEntry(o,s)}}this.trackingSchedule=new Map(Array.from(this.trackingSchedule).sort((function(e,t){return e[0]-t[0]})))}for(var u,c=f(this.adVerifications);!(u=c()).done;)u.value.postParse(this.broker,(function(e){t.addMacroSubstitution("REASON",e.getPayload())}));this.nonLinearAds.postParse(),this.linearCreative&&this.linearCreative.initialiseInteractiveCreative(this.nonLinearAds.getNonLinearCreatives()),this.prefetchResources(e.getSessionProperties()),this.active=!0},h.prefetchResources=function(e){e.getPrefetchResources()&&(this.nonLinearAds.prefetchResources(e.getResourceTimeout()),this.companionAds.prefetchResources(e.getResourceTimeout()))},h.removeFromTrackingSchedule=function(e){this.trackingSchedule.delete(e)},h.removeMacroSubstitution=function(e){this.macroSubstitutions.delete(e)},h.removeTrackingSchedule=function(){this.trackingSchedule.clear()},h.setDuration=function(e){this.linearCreative&&this.linearCreative.setDuration(e)},h.setInactive=function(){this.active=!1},h.setStart=function(e){this.startMillis=e},h.toString=function(){if(this.isFiller())return"\n--- Advert ---\n - Filler duration: "+this.getDuration();var e="\n* Impression(s):";if(this.impressions)for(var t,n=f(this.impressions.getTrackingUrls());!(t=n()).done;)e+=t.value;else e+="NONE";var r="\n* Viewable Impression(s):";r+=c.buildMapString(this.viewableImpressions);var i="\n * Ad Verification(s):";i+=(0,u.toIndentedString)(this.adVerifications);var o="\n Error(s):";if(this.errors)for(var a,s=f(this.errors.getTrackingUrls());!(a=s()).done;){var l=a.value;o+=(0,u.toIndentedString)("\n - "+l)}else o+="NONE";var d="\n--- Advert ---\n ID:";d+=this.mediaIdentifier,d+="(",d+=this.identifier,d+=")",d+=" duration:",d+=this.getDuration(),d+=" sequence:",d+=this.sequence,d+=" adtype:",d+=this.adType;for(var _,h=f(this.properties);!(_=h()).done;){var p=_.value;d+="\n"+(0,u.toIndentedString)(p)}return this.extensions&&(d+="\n * Extensions:",d+="\n"+(0,u.toIndentedString)(this.getExtensions())),this.wrapper&&(d+="\n * Lineage -\n",d+=(0,u.toIndentedString)(this.wrapper)),d+=(0,u.toIndentedString)(e),d+=(0,u.toIndentedString)(r),d+=(0,u.toIndentedString)(i),d+=(0,u.toIndentedString)(o),this.nonLinear||(d+=(0,u.toIndentedString)(this.linearCreative)),(d+=(0,u.toIndentedString)(this.nonLinearAds))+(0,u.toIndentedString)(this.companionAds)},c}(c.AdvertEventHandler);t.Advert=g,g.viewableEventMap=new Map,g.viewableEventMap.set(c.ViewableEvent.VIEWABLE,"Viewable"),g.viewableEventMap.set(c.ViewableEvent.NOT_VIEWABLE,"NotViewable"),g.viewableEventMap.set(c.ViewableEvent.VIEW_UNDETERMINED,"ViewUndetermined")},982:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}t.__esModule=!0,t.AdvertWrapper=void 0;var i=function(e){var t,n;function i(t,n,r){var i;return(i=e.call(this)||this).identifier=t,i.creativeIdentifier=n,i.adSystem=r,i.child=null,i}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n);var o=i.prototype;return o.getAdSystem=function(){return this.adSystem},o.getCreativeIdentifier=function(){return this.creativeIdentifier},o.getIdentifier=function(){return this.identifier},o.getLineage=function(){return this.child},o.isValid=function(){var e=this;do{if(!e.identifier||""===e.identifier)return!1;e=e.getLineage()}while(e);return!0},o.setChild=function(e){this.child=e},i}(n(3730).XmlValidation);t.AdvertWrapper=i},862:(e,t,n)=>{"use strict";t.__esModule=!0,t.CompanionAds=void 0;var r=n(597),i=n(3698);function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0){e="\n--- Companion Ads required:",e+=this.required;for(var t,n=o(this.companions);!(t=n()).done;){var i=t.value;e+=(0,r.toIndentedString)(i)}}return e},e}();t.CompanionAds=s},7964:(e,t,n)=>{"use strict";t.__esModule=!0,t.CompanionCreative=void 0;var r=n(5250),i=n(5489),o=n(6044),a=n(7823),s=n(597);function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0||this.trackingMap.size>0},c.isVisible=function(){return this.visible},c.onClickThrough=function(){if(this.isVisible()){var e=this.videoClicks.getClickTrackingUrls(),t=(0,o.getClickTrackingReport)(e,"CompanionClickTracking");t&&this.broker.fireTrackingReportForCreative(t,this)}else a.YoLog.w("Companion is not visible")},c.onTrackingEvent=function(e){},c.prefetchResources=function(e){(0,o.prefetch)(this.resources,e)},c.setVisible=function(e){if(this.visible!==e&&(this.visible=e,e)){var t=this.trackingMap.get("creativeView");t&&this.broker.fireTrackingReportForCreative(t,this)}},c.toString=function(){for(var t,n="\n--- Companion ---\n",r=u(this.properties);!(t=r()).done;){var i=t.value;n+="\n"+(0,s.toIndentedString)(i)}n+=(0,s.toIndentedString)("\nAlt Text: "+this.altText),n+=(0,s.toIndentedString)(this.videoClicks);for(var o,a=u(this.resources);!(o=a()).done;){var c=o.value,l=c[0],d=c[1];n+=(0,s.toIndentedString)(l+":"+d)}return n+e.prototype.toString.call(this)},r}(r.Creative);t.CompanionCreative=d},5250:(e,t,n)=>{"use strict";t.__esModule=!0,t.Creative=void 0;var r=n(597),i=n(4796);function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";t.__esModule=!0,t.IconClickFallbackImage=void 0;var r=n(6044),i=n(3730),o=n(597);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.properties);!(t=n()).done;){var r=t.value;if(r.getName()===e)return r}return null},u.getResource=function(){return this.resource},u.isValid=function(){return!(!(0,r.isValidSize)(this.properties)||(0,o.isNullOrEmpty)(this.altText)&&!this.resource)},i}(i.XmlValidation);t.IconClickFallbackImage=u},6464:(e,t,n)=>{"use strict";t.__esModule=!0,t.IndustryIcon=void 0;var r=n(5489),i=n(597),o=n(4796),a=n(1862),s=(n(6265),n(3698),n(9473),n(6044));function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0},c.onClickThrough=function(){if(this.isVisible()){var e=this.videoClicks.getClickTrackingUrls();if(e.length>0){var t=(0,s.getClickTrackingReport)(e,"IconClickTracking");t&&this.broker.fireTrackingReportForIcon(t,this)}}},c.onTrackingEvent=function(e){},c.setVisible=function(e){if(this.visible!==e&&(this.visible=e,this.visible&&this.videoClicks.getCustomClicks().length>0)){var t=new a.TrackingReport("IconViewTracking",this.videoClicks.getCustomClicks());t&&this.broker.fireTrackingReportForIcon(t,this)}},c.toString=function(){var e="";e+=this.videoClicks.toString(),this.properties.length>0&&(e+="\nIcon Properties: ");for(var t,n=u(this.properties);!(t=n()).done;){var r=t.value;e+="\n"+(0,i.toIndentedString)(r)}this.resources.length>0&&(e+="\nIcon Resource(s): ");for(var o,a=u(this.resources);!(o=a()).done;){var s=o.value,c=s[0],l=s[1];e+=(0,i.toIndentedString)(c+":"+l)}this.clickFallbackImages.length>0&&(e+="\nIcon Click Fallback Images: ");for(var d,_=u(this.clickFallbackImages);!(d=_()).done;){var f=d.value;e+="\n"+(0,i.toIndentedString)(f)}return e},o}(o.CreativeEventHandler);t.IndustryIcon=d},1305:(e,t,n)=>{"use strict";t.__esModule=!0,t.InteractiveCreative=void 0;var r=n(597),i=n(1862),o=n(4796),a=(n(6646),n(9473),n(7823)),s=n(5406);function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0){e+="\nProperties:";for(var t,n=u(this.properties);!(t=n()).done;){var i=t.value;e+=(0,r.toIndentedString)(i)}}return this.tracking&&(e+="\nTracking event:",e+=(0,r.toIndentedString)("\n "+this.tracking)),e},o}(o.CreativeEventHandler);t.InteractiveCreative=d},6474:(e,t,n)=>{"use strict";t.__esModule=!0,t.LinearCreative=void 0;var r=n(5250),i=n(3755),o=n(5489),a=n(7823),s=n(1862),u=n(6044),c=n(597);function l(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0},d.onClickThrough=function(){var e=this.videoClicks.getClickTrackingUrls();if(e.length>0){var t=(0,u.getClickTrackingReport)(e,"ClickTracking");this.broker.fireTrackingReportForCreative(t,this)}this.broker.raiseTrackingCallbackForCreative("ClickTracking",this)},d.onTrackingEvent=function(e){if("customClick"===e){var t=this.videoClicks.getCustomClicks();if(t.length){var n=new s.TrackingReport(e,t);this.broker.fireTrackingReportForCreative(n,this)}}else{if(s.TrackingReport.isValidPlayerOperationEvent(e))return void a.YoLog.w("Use PlaybackEventHandler functions to signal event "+e);if(s.TrackingReport.isTimelineEvent(e))return void a.YoLog.w("Invalid event: "+e+". Timeline events are signalled by position updates");var r=this.trackingMap.get(e);r&&this.broker.fireTrackingReportForCreative(r,this)}},d.setDuration=function(e){this.duration=e},d.toString=function(){var t="";if(this.trackingMap.size>0){t+="\n ** Tracking events - ";for(var n,r=l(this.trackingMap);!(n=r()).done;){var i=n.value,o=i[0],a=i[1];t+=(0,c.toIndentedString)("\n "+o+":"+a)}}var s="";if(this.icons.length>0){s+="\n ** Industry Icon(s) - ";for(var u,d=l(this.icons);!(u=d()).done;)s+=u.value}var _="\n--- Linear Creative:\n - assetUri:";return _+=this.assetUri,this.interactiveCreative&&(_+=this.interactiveCreative),_+=e.prototype.toString.call(this),(0,c.isNullOrEmpty)(this.skipOffset)||(_+="\n - SkipOffset:",_+=this.skipOffset),_+=t,(_+=(0,c.toIndentedString)(this.videoClicks))+s},r}(r.Creative);t.LinearCreative=f},50:(e,t,n)=>{"use strict";t.__esModule=!0,t.NonLinearAds=void 0;var r=n(597);function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0){var e="\n--- NonLinear Ads:";if(this.trackingMap.size>0){e+="\n ** Tracking events - ";for(var t,n=i(this.trackingMap);!(t=n()).done;){var o=t.value,a=o[0],s=o[1];e+=(0,r.toIndentedString)("\n "+a+":"+s)}}for(var u,c=i(this.nonLinearCreatives);!(u=c()).done;){var l=u.value;e+=(0,r.toIndentedString)(l)}return e}return""},e}();t.NonLinearAds=a},6646:(e,t,n)=>{"use strict";t.__esModule=!0,t.NonLinearCreative=void 0;var r=n(5250),i=n(5489),o=n(6044),a=n(597),s=n(7823),u=n(1862);function c(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0},l.isVisible=function(){return this.visible},l.onClickThrough=function(){if(this.visible){var e=this.videoClicks.getClickTrackingUrls();if(e.length>0){var t=(0,o.getClickTrackingReport)(e,"NonLinearClickTracking");t&&this.broker.fireTrackingReportForCreative(t,this)}}else s.YoLog.w("Nonlinear creative is not visible")},l.onTrackingEvent=function(e){if(this.visible)if(u.TrackingReport.isValidVisibleEvent(e))s.YoLog.w("Use method setVisible() to signal event: "+e);else if(!u.TrackingReport.isValidPlayerOperationEvent(e)||this.isNonLinear)if(u.TrackingReport.isValidNonLinearEvent(e)){var t=this.trackingMap.get(e);t&&this.broker.fireTrackingReportForCreative(t,this),"acceptInvitation"===e&&this.broker.raiseTrackingCallbackForCreative(e,this)}else s.YoLog.w("Invalid tracking event: "+e);else s.YoLog.w("Use PlaybackEventHandler functions to signal event: "+e);else s.YoLog.w("Nonlinear creative is not visible")},l.prefetchResources=function(e){(0,o.prefetch)(this.resources,e)},l.setTrackingReports=function(e){this.trackingMap=e},l.setVisible=function(e){var t;this.visible!==e&&(this.visible=e,(t=e?this.trackingMap.get("creativeView"):this.trackingMap.get("close"))&&this.broker.fireTrackingReportForCreative(t,this))},l.toString=function(){var t="\n--- NonLinear Creative:";t+=(0,a.toIndentedString)(this.videoClicks),this.properties.length>0&&(t+="\n - NonLinear Properties: ");for(var n,r=c(this.properties);!(n=r()).done;){var i=n.value;t+="\n"+(0,a.toIndentedString)(i)}this.resources.size>0&&(t+="\n - NonLinear Resource(s): ");for(var o,s=c(this.resources);!(o=s()).done;){var u=o.value,l=u[0],d=u[1];t+=(0,a.toIndentedString)(l+":"+d)}return t+e.prototype.toString.call(this)},r}(r.Creative);t.NonLinearCreative=_},2385:(e,t,n)=>{"use strict";t.__esModule=!0,t.ReportsManager=t.ReportingParams=void 0;var r=n(3755),i=n(1862),o=n(7823),a=n(5406),s=n(597),u=n(9513),c=n(868),l=n(1126);function d(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&!this.shouldSuppress(e.event))try{this.fire(e,t)}catch(e){throw o.YoLog.e("Unable to fire tracking URLs for report: "+e),e}},t.fireBeacons=function(e,t){for(var n,r=[],o=d(e);!(n=o()).done;)for(var a,s=d(n.value.getTrackingUrls());!(a=s()).done;){var u=a.value;r.push(u)}this.fireBeacon(new i.TrackingReport("",r),t)},t.performMacroSubstitutionForUrl=function(e,t){var n,i=(0,r.millisToTimestamp)(Date.now()),o=(0,r.millisToTimeString)(t.getPlayhead()),a=-1===t.getAdvertStart()?"-1":(0,r.millisToTimeString)(t.getAdvertStart());n=encodeURIComponent(t.getAssetUri()),i=encodeURIComponent(i),o=encodeURIComponent(o),a=encodeURIComponent(a);var s=1e7+Math.round(1e8*Math.random());e=e.replace("[ASSETURI]",n).replace("%5BASSETURI%5D",n).replace("[CACHEBUSTING]",s).replace("%5BCACHEBUSTING%5D",s).replace("[TIMESTAMP]",i).replace("%5BTIMESTAMP%5D",i).replace("[CONTENTPLAYHEAD]",o).replace("%5BCONTENTPLAYHEAD%5D",o).replace("[MEDIAPLAYHEAD]",o).replace("%5BMEDIAPLAYHEAD%5D",o).replace("[ADPLAYHEAD]",a).replace("%5BADPLAYHEAD%5D",a);for(var u,c=d(t.getMacroSubstitutions());!(u=c()).done;){var l=u.value,_=l[0],f=l[1];e=e.replace("["+_+"]",f).replace("%5B"+_+"%5D",f)}return(e=e.replace(/\[(.*?)]/g,"-1")).replace(/%5B(.*)%5D/g,"-1")},t.raiseAdBreakEarlyReturn=function(e,t){o.YoLog.trace("earlyreturn");for(var n,r=d(this.observers);!(n=r()).done;){var i=n.value;(0,c.raiseCallback)(i,i.onAdvertBreakEarlyReturn,e,t)}},t.raiseAdBreakCallback=function(e,t,n){if("start"===e)for(var r,i=d(this.observers);!(r=i()).done;){var o=r.value;(0,c.raiseCallback)(o,o.onAdvertBreakStart,t,n)}else if("end"===e)for(var a,s=d(this.observers);!(a=s()).done;){var u=a.value;(0,c.raiseCallback)(u,u.onAdvertBreakEnd,n)}},t.raiseAdvertCallback=function(e,t,n){if("start"===e)for(var r,i=d(this.observers);!(r=i()).done;){var o=r.value;(0,c.raiseCallback)(o,o.onAdvertStart,t,n)}else if("end"===e)for(var a,s=d(this.observers);!(a=s()).done;){var u=a.value;(0,c.raiseCallback)(u,u.onAdvertEnd,n)}},t.raiseAnalyticUpdateCallback=function(e){if(!this.suppress)for(var t,n=d(this.observers);!(t=n()).done;){var r=t.value;(0,c.raiseCallback)(r,r.onAnalyticUpdate,e)}},t.raiseSessionErrorCallback=function(e,t){for(var n,r=d(this.observers);!(n=r()).done;){var i=n.value;(0,c.raiseCallback)(i,i.onSessionError,e,t)}},t.raiseTrackingCallback=function(e,t){if(!this.shouldSuppress(e))for(var n,r=d(this.observers);!(n=r()).done;){var i=n.value;(0,c.raiseCallback)(i,i.onTrackingEvent,e,t)}},t.removeAnalyticObserver=function(e){this.observers.splice(this.observers.indexOf(e))},t.reportsSuppressed=function(){return this.suppress},t.shouldSuppress=function(e){var t=i.TrackingReport.categoryForEvent(e);return 0==(this.properties.getExcludedCategories()&t)&&this.suppress},t.suppressReports=function(e){this.suppress!==e&&(this.suppress=e,o.YoLog.d(o.DebugFlags.DEBUG_REPORTS,e?"Suppress reports":"Unsuppress reports"))},e}();t.ReportsManager=f;var h=function(){function e(e,t,n,r){this.playhead=e,this.advertStart=t&&t>=0?e-t:-1,this.assetUri=n||"",this.macroSubstitutions=r||new Map}var t=e.prototype;return t.getAdvertStart=function(){return this.advertStart},t.getAssetUri=function(){return this.assetUri},t.getMacroSubstitutions=function(){return this.macroSubstitutions},t.getPlayhead=function(){return this.playhead},e}();t.ReportingParams=h},3698:(e,t,n)=>{"use strict";t.__esModule=!0,t.ResourceType=t.Resource=void 0;var r=n(597),i=n(3730),o=n(7823),a=n(9513);function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var u={STATIC:0,HTML:1,IFRAME:2,UNKNOWN:3};t.ResourceType=u;var c=function(e){var t,n;function i(t,n,r,i){var o;switch(o=e.call(this)||this,t){case u.STATIC:o.stringData=n,o.creativeType=r,o.encoded=!1,o.type=t;break;case u.IFRAME:o.stringData=n,o.creativeType=null,o.type=t,o.encoded=!1;break;case u.HTML:o.stringData=n,o.creativeType=null,o.type=t,o.encoded=i}return o.byteData=null,o}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var c=i.prototype;return c.getByteData=function(){return this.byteData},c.getCreativeType=function(){return this.creativeType},c.getResourceType=function(){return this.type},c.getStringData=function(){return this.stringData},c.isEncoded=function(){return this.encoded},c.isValid=function(){switch(this.type){case u.STATIC:if(!this.creativeType||""===this.creativeType)return!1;break;case u.HTML:if(!this.stringData||""===this.stringData)return!1;break;case u.IFRAME:try{new URL(this.stringData)}catch(e){return!1}break;default:return!1}return!0},c.prefetch=function(e){var t=this;this.byteData||this.type===u.HTML||this.type===u.UNKNOWN||a.HttpConnection.get(this.stringData,{},e).then((function(e){e.ok?t.byteData=e.body:o.YoLog.e("Resource prefetch request failed: "+t.stringData+", status: "+e.status+", error:"+e.statusText)}))},c.toString=function(){var e="";switch(this.type){case u.STATIC:e+="\nStatic resource (",e+=this.creativeType,e+="): ",e+=this.stringData;break;case u.HTML:e+="\nHTML resource (",e+=this.encoded?"encoded): ":"unencoded): ",e+=(0,r.formatHtml)(this.stringData);break;case u.IFRAME:e+="\niFrame resource: ",e+=this.stringData}return e},i}(i.XmlValidation);t.Resource=c},1862:(e,t,n)=>{"use strict";t.__esModule=!0,t.TrackingReport=void 0;var r=n(1289),i=n(7823);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.trackingUrls);!(t=n()).done;)e+="\n - Url:",e+=t.value;return e},e}();t.TrackingReport=a},9473:(e,t,n)=>{"use strict";t.__esModule=!0,t.VASTProperty=void 0;var r=n(597);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0){e+=", Attributes:{";for(var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.attributes);!(t=n()).done;){var o=t.value;e+=o[0]+":"+o[1]+" "}e+="}"}return e},e}();t.VASTProperty=o},5489:(e,t,n)=>{"use strict";t.__esModule=!0,t.VideoClicks=void 0;var r=n(597);function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0)for(var t,n=i(this.clickTrackingUrls);!(t=n()).done;)e+="\n* Click tracking Url: ",e+=t.value;if(this.customClicks.length>0)for(var o,a=i(this.customClicks);!(o=a()).done;)e+="\n* Custom click Url: ",e+=o.value;return e},e}();t.VideoClicks=a},8002:(e,t,n)=>{"use strict";t.__esModule=!0,t.XmlNode=void 0;var r=n(597);function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n";else{t+=">",(0,r.isNullOrEmpty)(this.text)||(t+=this.text);for(var c,l=i(this.children);!(c=l()).done;){var d=c.value;t+=(0,r.toIndentedString)("\n"+d)}(0,r.isNullOrEmpty)(this.text)||0!==this.children.length?t+=(0,r.toUnindentedString)("\n"):(t+="")}return t},e}();t.XmlNode=a},8686:(e,t)=>{"use strict";t.__esModule=!0,t.Logger=void 0;var n=function(){function e(){}return e.debug=function(e){console.log(e)},e.error=function(e){console.error(e)},e.info=function(e){console.info(e)},e.warn=function(e){console.warn(e)},e}();t.Logger=n},420:(e,t)=>{"use strict";function n(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0||this.nonLinearAdBreaks.length>0||this.displayAdBreaks.length>0},t.isEqualTo=function(e){return this.hashCode===e.hashCode},t.processStreamData=function(e){this.sessionIdentifier=e.getSessionIdentifier(),this.streamDuration=e.getDuration(),this.hostNode=e.getHostNode(),this.hostSuffix=e.getHostSuffix(),this.pdtInitial=e.getPdtInitial(),this.pdtStart=e.getPdtStart(),this.pdtEnd=e.getPdtEnd(),this.earlyReturn=e.getEarlyReturn(),this.hasPlaceholder=e.getHasPlaceholder()},t.setHash=function(e){if(e){var t,n=0;for(t=0;t{"use strict";t.__esModule=!0,t.DashManifestParser=void 0;var r,i=n(7823),o=n(6161),a=(r=n(6099))&&r.__esModule?r:{default:r},s=n(1289),u=function(){function e(){this.data=new Map,this.s="",this.error=null,this.onError=this.onError.bind(this),this.onText=this.onText.bind(this),this.onOpenTag=this.onOpenTag.bind(this),this.onCloseTag=this.onCloseTag.bind(this),this.onCdata=this.onCdata.bind(this)}e.parse=function(t){return t&&0!==t.length?(new e).parse(t):(i.YoLog.e("Yospace DASH manifest is empty"),null)};var t=e.prototype;return t.parse=function(e){var t=a.default.parser(!0);return t.onerror=this.onError,t.ontext=this.onText,t.onopentag=this.onOpenTag,t.onclosetag=this.onCloseTag,t.oncdata=this.onCdata,t.write(e),this.error?null:new o.PlaylistPayload(this.data,1600)},t.onCdata=function(e){this.s+=e},t.onError=function(){this.error=!0},t.onCloseTag=function(e){if("LOCATION"===e.toUpperCase()){var t=this.s.trim();this.data.set(s.Payload.LOCATION,t);var n=t.split(/\?/);try{var r=new URL(n[0]);this.data.set(s.Payload.SCHEME,r.protocol.substring(0,r.protocol.length-1)),this.data.set(s.Payload.HOSTNODE,r.hostname),this.data.set(s.Payload.PORT,r.port),this.data.set(s.Payload.QS,2===n.length?n[1]:null);var o=n[0].match("/live/(\\d+)/.+?;jsessionid=([^?\\s]+)");if(o)this.data.set(s.Payload.IDENTIFIER,o[2]);else if(-1!==t.indexOf("yo.js")){var a=t.match("yo.js=([^&]+)");a&&this.data.set(s.Payload.IDENTIFIER,a[1])}void 0===this.data.get(s.Payload.IDENTIFIER)&&(this.error=!0)}catch(e){i.YoLog.e("Failed to parse Location element: "+e),this.error=!0}}},t.onOpenTag=function(e){this.s="","MPD"===e.name.toUpperCase()&&(this.data.set(s.Payload.ANALYTICURL,e.attributes.analytics),this.data.set(s.Payload.PAUSEURL,e.attributes.livePause),this.data.set(s.Payload.AVAILABILITYSTART,new Date(e.attributes.availabilityStartTime)))},t.onText=function(e){this.s=e},e}();t.DashManifestParser=u},1622:(e,t,n)=>{"use strict";t.__esModule=!0,t.HlsManifestParser=void 0;var r=n(597),i=n(7823),o=n(1289),a=n(6161),s=n(5406);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=7&&-1!==e.toUpperCase().indexOf("#EXTM3U")},t.parseManifestLines=function(e){for(var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e.split(/\r?\n/));!(t=n()).done;){var r=t.value;0!==r.length&&(r.startsWith("#")?this.processManifestDirective(r):this.nextLineStreamInf&&!this.data.has(d)&&this.data.set(d,r))}},t.processManifestDirective=function(e){var t=e.indexOf(":");if(-1!==t){var n=e.substring(t+1),r=e.substring(0,t);r.includes("#EXT-X-YOSPACE-ANALYTICS-URL")?this.data.set(o.Payload.ANALYTICURL,n.replace(/"/g,"")):r.includes("#EXT-X-STREAM-INF")?this.data.has(d)||(this.nextLineStreamInf=!0):r.includes("#EXT-X-YOSPACE-PAUSE")?this.data.set(o.Payload.PAUSEURL,n.replace(/"/g,"")):r.includes("#EXT-X-YOSPACE-SDK-MASTER-URL")&&this.data.set(o.Payload.LOCATION,n.replace(/"/g,""))}},e.parse=function(t){var n=new e;return e.checkParameters(t)?(n.parseManifestLines(t),n.buildPlaybackUrl(),new a.PlaylistPayload(n.data,o.Constant.INTERSEGMENT_TIMEOUT)):null},e}();t.HlsManifestParser=_},6028:(e,t,n)=>{"use strict";t.__esModule=!0,t.StreamData=t.Parser=t.CreativeData=t.AdvertData=void 0;var r,i=(r=n(6099))&&r.__esModule?r:{default:r},o=n(7823),a=n(3755),s=n(1235),u=n(6366),c=n(982),l=n(7964),d=n(6265),_=n(6464),f=n(1305),h=n(6474),p=n(50),g=n(6646),v=n(3698),m=n(9473),y=n(5489),b=n(8002),S=n(1862),E=n(8710),$=n(862),T=n(597),A=n(5406),C=n(420),P=n(936),I=n(7351);function w(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=4.2},t.getStreamData=function(){return this.streamData},t.handleCreativeExtensionsForOnEndDefault=function(e){var t=this.advertData.processingCompanionCreative?this.creativeData.companionExtensionStack:this.creativeData.extensionStack,n=t.length;2===n?(this.pop(!1,!0),this.processingCreativeExtensions=!1):n>0&&e===t[n-1].getName()&&this.pop(!1,!0)},t.handleStartAd=function(e){this.advertData.id=e.id;var t=parseInt(e.sequence);this.advertData.sequence=Number.isNaN(t)?0:t,Number.isNaN(t)||(this.advertData.sequence=t),this.advertData.adType=e.adType,s.AdBreak.getBreakTypeFromString(this.adBreakData.breakType)!==s.BreakType.LINEAR&&(this.advertData.nonLinear=!0)},t.handleStartAdWrapper=function(e){var t=e.id?e.id:"",n=e.creativeId?e.creativeId:"",r=e.AdSystem?e.AdSystem:"",i=new c.AdvertWrapper(t,n,r);this.advertData.topLevelWrapper&&i.setChild(this.advertData.topLevelWrapper),this.advertData.topLevelWrapper=i},t.handleStartCreative=function(e){this.creativeData.advertId=e.adId,this.creativeData.id=e.id;var t=parseInt(e.sequence);this.creativeData.sequence=isNaN(t)?0:t},t.handleStartCreativeExtension=function(e,t){var n=e.type;-1===(n=n||"").indexOf("com.yospace")&&-1===n.indexOf("AdVerifications")&&(this.processingCreativeExtensions=!0,this.addToCreativeExtensionStack(new b.XmlNode(t.name,(0,P.objectToMap)(e))))},t.handleStartExtension=function(e,t){var n=e.type;-1===(n=n||"").indexOf("com.yospace")&&-1===n.indexOf("AdVerifications")&&(this.processingAdvertExtensions=!0,this.advertData.extensionStack.push(new b.XmlNode(t.name,(0,P.objectToMap)(e))))},t.handleStartExtensionElement=function(e,t){this.processingAdvertExtensions?this.advertData.extensionStack.push(new b.XmlNode(t.name,(0,P.objectToMap)(e))):this.processingCreativeExtensions&&this.addToCreativeExtensionStack(new b.XmlNode(t.name,(0,P.objectToMap)(e)))},t.handleStartHtmlResource=function(e){var t=e.xmlEncoded,n=!!t&&("TRUE"===t.toUpperCase()||"1"===t);this.iconData.properties.length>0?this.iconData.htmlResourceEncoded=n:this.creativeData.htmlResourceEncoded=n},t.handleStartPricing=function(e){var t=e.model;this.advertData.pricingModel=t?t.toUpperCase():"",this.advertData.pricingCurrency=e.currency},t.handleStartStaticResource=function(e){this.iconClickFallbackImageData.properties.length>0?this.iconClickFallbackImageData.staticResourceCreativeType=e.creativeType:this.iconData.properties.length>0?this.iconData.staticResourceCreativeType=e.creativeType:this.creativeData.staticResourceCreativeType=e.creativeType},t.handleStartTracking=function(e){if(this.creativeData.trackingEvent=e.event,"progress"===this.creativeData.trackingEvent){var t=e.offset;(0,T.isNullOrEmpty)(t)||(this.creativeData.trackingEvent=this.creativeData.trackingEvent+"-"+t)}},t.handleEndAd=function(){var e=new u.Advert(this.advertData);if(e.isValid())this.adBreakData.adverts.push(e);else if(this.advertData.nonLinear||this.advertData.linearCreative){if((0,T.isNullOrEmpty)(e.mediaIdentifier)){var t=new I.ParsingError(null,I.ParsingError.Message.INVALID_MEDIAID,"Yospace media identifier could not be parsed (advert id: "+this.advertData.id+")");this.broker.addParsingError(t)}}else{var n=new I.ParsingError(null,I.ParsingError.Message.MISSING_CREATIVE,"No creative for advert: "+this.advertData.id);this.broker.addParsingError(n)}e.isValid()||o.YoLog.w("Invalid advert. Discarding ("+this.advertData.id+")"),this.advertData.clear()},t.handleAdvertExtensionsForOnEndDefault=function(e){var t=this.advertData.extensionStack.length;2===t?(this.pop(!0,!0),this.processingAdvertExtensions=!1):t>0&&e===this.advertData.extensionStack[t-1].getName()&&this.pop(!0,!0)},t.handleEndAdTitle=function(){var e=this.characters.trim();this.advertData.properties.push(new m.VASTProperty("AdTitle",e)),"filler"===e&&(this.advertData.filler=!0)},t.handleEndClickTracking=function(){var e=this.characters.trim();(0,A.getUrl)(e)?this.creativeData.clickThroughTrackings.push(e):o.YoLog.w("Discarding click tracking URL:"+e)},t.handleEndCompanion=function(){var e=null;(0,T.isNullOrEmpty)(this.creativeData.clickThroughUrl)||(e=new y.VideoClicks(this.creativeData.clickThroughUrl,this.creativeData.clickThroughTrackings,null));var t=new l.CompanionCreative(this.creativeData,e,this.creativeData.nonLinearResources,this.creativeData.trackingMap,this.broker);t.isValid()?(t.setNonLinear(this.advertData.nonLinear),this.companionAdsData.companions.push(t)):o.YoLog.w("Discarding invalid Companion"),this.creativeData.clear()},t.handleEndCompanionClickTracking=function(){var e=this.characters.trim();(0,A.getUrl)(e)?this.creativeData.clickThroughTrackings.push(e):o.YoLog.w("Discarding empty Companion click tracking URL")},t.handleEndCreative=function(){switch(this.advertData.currentCreativeType){case 1:for(var e,t=w(this.advertData.companionAds.companions);!(e=t()).done;)e.value.postParse(this.creativeData.extensions);break;case 2:this.advertData.linearCreative&&this.advertData.linearCreative.postParse(this.creativeData.extensions);break;case 3:for(var n,r=w(this.advertData.nonLinearAds.nonLinearCreatives);!(n=r()).done;)n.value.postParse(this.creativeData.extensions)}this.creativeData.clearAll()},t.handleEndCustomClick=function(){var e=this.characters.trim();""!==e?this.creativeData.clickThroughCustoms.push(e):o.YoLog.w("Discarding empty custom click URL")},t.handleEndError=function(e){var t=this.characters.trim();(0,A.getUrl)(t)?this.advertData.errors?this.advertData.errors.addTrackingUrl(t):this.advertData.errors=new S.TrackingReport(e,[t]):o.YoLog.w("Discarding empty Error")},t.handleEndExecutableResource=function(){if(this.advertData.verificationApiFramework&&this.advertData.verificationResourceType){var e=new m.VASTProperty("ExecutableResource",this.characters.trim(),"apiFramework",this.advertData.verificationApiFramework);e.addAttribute("type",this.advertData.verificationResourceType),this.advertData.verificationResources.push(e)}this.advertData.verificationApiFramework=null,this.advertData.verificationResourceType=null},t.handleEndIcon=function(){var e=null;(!(0,T.isNullOrEmpty)(this.iconData.clickThroughUrl)||this.iconData.viewTrackings.length>0)&&(e=(0,T.isNullOrEmpty)(this.iconData.clickThroughUrl)?new y.VideoClicks(null,null,this.iconData.viewTrackings):new y.VideoClicks(this.iconData.clickThroughUrl,this.iconData.clickTrackings,this.iconData.viewTrackings));var t=new _.IndustryIcon(this.iconData.properties,this.iconData.resources,e,this.iconData.clickFallbackImages,this.broker);t.isValid()?this.creativeData.icons.push(t):o.YoLog.w("Discarding invalid Icon"),this.iconData.clear()},t.handleEndIFrameResource=function(){var e=this.characters.trim();this.iconData.properties.length>0?this.iconData.resources.push(new v.Resource(v.ResourceType.IFRAME,e)):this.creativeData.nonLinearResources.push(new v.Resource(v.ResourceType.IFRAME,e))},t.handleEndExtensionElement=function(e){this.processingAdvertExtensions?this.handleAdvertExtensionsForOnEndDefault(e):this.handleCreativeExtensionsForOnEndDefault(e)},t.handleEndHtmlResource=function(){if(this.iconData.properties.length>0){var e=this.characters.trim();this.iconData.resources.push(new v.Resource(v.ResourceType.HTML,e,null,this.iconData.htmlResourceEncoded))}else this.creativeData.nonLinearResources.push(new v.Resource(v.ResourceType.HTML,this.characters,null,this.creativeData.htmlResourceEncoded))},t.handleEndIconClickFallbackImage=function(){var e=new d.IconClickFallbackImage(this.iconClickFallbackImageData.properties,this.iconClickFallbackImageData.altText,this.iconClickFallbackImageData.resource);e.isValid()?this.iconData.clickFallbackImages.push(e):o.YoLog.w("Discarding invalid IconClickFallbackImage"),this.iconClickFallbackImageData.clear()},t.handleEndIconClickTracking=function(){var e=this.characters.trim();(0,A.getUrl)(e)?this.iconData.clickTrackings.push(e):o.YoLog.w("Discarding empty Icon click tracking URL")},t.handleEndIconViewTracking=function(){var e=this.characters.trim();(0,A.getUrl)(e)?this.iconData.viewTrackings.push(e):o.YoLog.w("Discarding empty Icon view tracking URL")},t.handleEndInteractiveTracking=function(){this.creativeData.interactiveTracking?this.creativeData.interactiveTracking.addTrackingUrl(this.characters.trim()):this.creativeData.interactiveTracking=new S.TrackingReport(this.creativeData.trackingEvent,[this.characters.trim()])},t.handleEndLinear=function(){var e=null;(!(0,T.isNullOrEmpty)(this.creativeData.clickThroughUrl)||this.creativeData.clickThroughCustoms.length>0)&&(e=(0,T.isNullOrEmpty)(this.creativeData.clickThroughUrl)?new y.VideoClicks(null,null,this.creativeData.clickThroughCustoms):new y.VideoClicks(this.creativeData.clickThroughUrl,this.creativeData.clickThroughTrackings,this.creativeData.clickThroughCustoms));var t=null;this.creativeData.properties.length>0&&((t=new f.InteractiveCreative(this.creativeData.icSource,this.creativeData.properties,this.broker,this.creativeData.interactiveTracking)).isValid()||(o.YoLog.w("Discarding invalid InteractiveCreative"),t=null));var n=new h.LinearCreative(this.creativeData,e,t,this.broker);n.isValid()?this.advertData.linearCreative=n:o.YoLog.w("Discarding invalid LinearCreative"),this.creativeData.clear()},t.handleEndImpression=function(e){var t=this.characters.trim();(0,A.getUrl)(t)?this.advertData.impressions?this.advertData.impressions.addTrackingUrl(t):this.advertData.impressions=new S.TrackingReport(e,[t]):o.YoLog.w("Discarding empty Impression")},t.handleEndInteractiveCreativeFile=function(){this.creativeData.icSource=this.characters.trim()},t.handleEndJavaScriptResource=function(){if(this.advertData.verificationApiFramework&&this.advertData.verificationBrowserOptional){var e=new m.VASTProperty(ne,this.characters.trim(),"apiFramework",this.advertData.verificationApiFramework);e.addAttribute("browserOptional",this.advertData.verificationBrowserOptional),this.advertData.verificationResources.push(e)}this.advertData.verificationApiFramework=null,this.advertData.verificationBrowserOptional=null},t.handleEndMediaFile=function(){0!==this.creativeData.properties.length?this.creativeData.icSource=this.characters.trim():this.creativeData.currentAssetUri=this.characters.trim()},t.handleEndNonLinearClickTracking=function(){var e=this.characters.trim();(0,A.getUrl)(e)?this.creativeData.clickThroughTrackings.push(e):o.YoLog.w("Discarding empty Nonlinear click tracking URL")},t.handleEndPricing=function(){var e=this.characters.trim();if(""!==e){var t=new m.VASTProperty(B,e,"currency",this.advertData.pricingCurrency);t.addAttribute("model",this.advertData.pricingModel),(0,T.isNullOrEmpty)(this.advertData.pricingCurrency)||(0,T.isNullOrEmpty)(this.advertData.pricingModel)?o.YoLog.w("Discarding invalid Pricing property"):this.advertData.properties.push(t)}else o.YoLog.w("Discarding invalid Pricing property")},t.handleEndUniversalAdId=function(){var e=this.characters.trim();""!==e?this.creativeData.universalAdIds.push(new m.VASTProperty(F,e,"idRegistry",this.creativeData.universalAdIdRegistry)):o.YoLog.w("Discarding empty UniversalAdId URL")},t.handleEndVerification=function(){var e=new E.AdVerification(this.advertData);e.isValid()?this.advertData.adVerifications.push(e):o.YoLog.w("Discarding invalid AdVerification"),this.advertData.verificationEvents=new Map,this.advertData.verificationResources=[],this.advertData.verificationParameters=null},t.handleEndVmapTracking=function(){var e=this.characters.trim();if(S.TrackingReport.isValidAdBreakEvent(this.adBreakData.trackingEvent))if((0,T.isNullOrEmpty)(e))o.YoLog.w("Discarding empty VMAP");else{var t=this.adBreakData.timelineTrackingMap.get(this.adBreakData.trackingEvent);t?t.addTrackingUrl(e):(t=new S.TrackingReport(this.adBreakData.trackingEvent,[e]),this.adBreakData.timelineTrackingMap.set(this.adBreakData.trackingEvent,t))}else o.YoLog.d(o.DebugFlags.DEBUG_PARSING,"Discarding invalid vmap:Tracking event")},t.handleEndNonLinear=function(){var e=null;this.creativeData.clickThroughUrl&&""!==this.creativeData.clickThroughUrl&&(e=new y.VideoClicks(this.creativeData.clickThroughUrl,this.creativeData.clickThroughTrackings,null));var t=new g.NonLinearCreative(this.creativeData,e,this.creativeData.nonLinearResources,this.broker);t.isValid()?(t.setNonLinear(this.advertData.nonLinear),this.nonLinearAdsData.nonLinearCreatives.push(t)):o.YoLog.w("Discarding invalid NonLinear"),this.creativeData.clear()},t.handleEndStaticResource=function(){var e=this.characters.trim();if(this.iconClickFallbackImageData.properties.length>0){var t=new v.Resource(v.ResourceType.STATIC,e,this.iconClickFallbackImageData.staticResourceCreativeType);if(t.isValid())return void(this.iconClickFallbackImageData.resource=t)}else if(this.iconData.properties.length>0){var n=new v.Resource(v.ResourceType.STATIC,e,this.iconData.staticResourceCreativeType);if(n.isValid())return void this.iconData.resources.push(n)}else{var r=new v.Resource(v.ResourceType.STATIC,e,this.creativeData.staticResourceCreativeType);if(r.isValid())return void this.creativeData.nonLinearResources.push(r)}o.YoLog.w("Discarding invalid StaticResource")},t.handleEndTracking=function(){var e=this.characters.trim();if((0,T.isNullOrEmpty)((0,A.getUrl)(e))){o.YoLog.w("Discarding empty tracking URL");var t=new I.ParsingError(null,I.ParsingError.Message.INVALID_TRACKING_URL,"Bad tracking url:"+e+" event: "+this.creativeData.trackingEvent);this.broker.addParsingError(t)}else{var n=null;S.TrackingReport.isValidVerificationEvent(this.creativeData.trackingEvent)?n=this.advertData.verificationEvents:2===this.advertData.currentCreativeType&&S.TrackingReport.isValidLinearEvent(this.creativeData.trackingEvent)||0===this.creativeData.trackingEvent.indexOf("progress")?n=this.creativeData.trackingMap:2===this.advertData.currentCreativeType&&S.TrackingReport.isValidInteractiveEvent(this.creativeData.trackingEvent)?this.handleEndInteractiveTracking():1===this.advertData.currentCreativeType&&S.TrackingReport.isValidCompanionEvent(this.creativeData.trackingEvent)?n=this.creativeData.trackingMap:3===this.advertData.currentCreativeType&&S.TrackingReport.isValidNonLinearEvent(this.creativeData.trackingEvent)&&(n=this.nonLinearAdsData.trackingMap),n&&this.parseMapForOnEndTracking(n)}},t.handleEndViewableImpression=function(e){var t=this.characters.trim();if((0,T.isNullOrEmpty)((0,A.getUrl)(t)))o.YoLog.w("Discarding empty ViewableImpression URL");else{var n=this.advertData.viewableImpressions.get(e);n?n.addTrackingUrl(t):(n=new S.TrackingReport(e,[t]),this.advertData.viewableImpressions.set(e,n))}},t.handleTextDataForExtensions=function(){var e=this.characters.trim();if(""!==e){var t=[];(t=this.processingAdvertExtensions?this.advertData.extensionStack:this.advertData.processingCompanionCreative?this.creativeData.companionExtensionStack:this.creativeData.extensionStack).length>0&&t[t.length-1].setInnerText(e)}},t.handleVmapAdBreak=function(){if(null!==this.adBreakData.earlyReturn)return this.streamData.earlyReturn=this.adBreakData.earlyReturn,void this.adBreakData.clear();s.AdBreak.getBreakTypeFromString(this.adBreakData.breakType)!==s.BreakType.LINEAR||this.skipNormalisation||(this.adBreakData.start=this.broker.normaliseAdBreakStart(this.adBreakData.start,this.adBreakData.position));var e=new s.AdBreak(this.adBreakData.start,this.adBreakData.duration,this.adBreakData.position,this.adBreakData.timelineTrackingMap,this.adBreakData.breakType,this.adBreakData.identifier,null,this.adBreakData.adTagUri);if(this.adBreakData.adverts.length>0&&e.setAdverts(this.adBreakData.adverts),e.postParse(this.broker),e.isValid())switch(s.AdBreak.getBreakTypeFromString(this.adBreakData.breakType)){case s.BreakType.LINEAR:this.linearAdBreaks.push(e);break;case s.BreakType.NONLINEAR:this.nonLinearAdBreaks.push(e);break;case s.BreakType.DISPLAY:this.displayAdBreaks.push(e)}else{var t=this.streamData.hasPlaceholder?" placeholder ":" ";o.YoLog.w("Discarding empty"+t+"ad break"),this.checkAdBreakForParsingErrors(e)}this.adBreakData.clear()},t.handleVmapAdTagURI=function(){this.streamData.hasPlaceholder=!0,this.adBreakData.adTagUri=this.characters.trim()},t.handleStartYospaceAdBreak=function(e){var t=e.duration;if(t&&(this.adBreakData.duration=(0,a.timeStringToMillis)(t,-1)),s.AdBreak.getBreakTypeFromString(this.adBreakData.breakType)===s.BreakType.LINEAR&&-1===this.adBreakData.duration){var n=new I.ParsingError(this.adBreakData.identifier,I.ParsingError.Message.INVALID_DURATION,I.ParsingError.Message.INVALID_DURATION+": "+t);this.broker.addParsingError(n)}var r=e.position;r&&(this.adBreakData.position=r);var i=e.earlyReturn;if(i){var o=(0,a.timeStringToMillis)(i,-1);this.adBreakData.earlyReturn=-1!==o?o+this.adBreakData.start:-1}},t.handleYospaceStream=function(e){var t=e.urlDomain;t&&(this.streamData.hostNode=t);var n=e.urlSuffix;if(n&&(this.streamData.hostSuffix=n),e.duration){var r=(0,a.timeStringToMillis)(e.duration,0);r&&(this.streamData.duration=r)}if(this.streamData.hostSuffix){var i=this.streamData.hostSuffix.match("yo.p.si=([^&]+)");i&&(this.streamData.sessionIdentifier=i[1])}this.streamData.pdtInitial=(0,a.pdtToMillis)(e.pdtinitial,null),this.streamData.pdtStart=(0,a.pdtToMillis)(e.pdtstart,null),this.streamData.pdtEnd=(0,a.pdtToMillis)(e.pdtend,null),(null===this.streamData.pdtStart||null===this.streamData.pdtEnd||this.streamData.pdtStart>this.streamData.pdtEnd)&&(this.streamData.pdtStart=null,this.streamData.pdtEnd=null,this.streamData.pdtInitial=null)},t.onCdata=function(e){this.characters=e,(this.processingAdvertExtensions||this.processingCreativeExtensions)&&this.handleTextDataForExtensions()},t.onOpenTag=function(e){var t=e.attributes;if(this.processingAdvertExtensions||this.processingCreativeExtensions)this.handleStartExtensionElement(t,e);else{if("vmap:VMAP"===e.name&&(this.isVmap=!0),"yospace:Stream"===e.name&&this.handleYospaceStream(t),e.name===R){this.adBreakData.timeOffset=t.timeOffset,this.adBreakData.timeOffset&&(this.adBreakData.start=(0,a.timeStringToMillis)(this.adBreakData.timeOffset,-1));var n=t.breakType;n&&(this.adBreakData.breakType=n);var r=t.breakId;r&&(this.adBreakData.identifier=r)}"yospace:AdBreak"===e.name&&this.handleStartYospaceAdBreak(t),e.name===D&&(this.adBreakData.trackingEvent=t.event),"VAST"===e.name&&(this.adBreakData.vastVersion=t.version,this.checkValidVersion(this.adBreakData.vastVersion)||(o.YoLog.e("Invalid or missing VAST version; is AV tag defined?"),this.isValidVAST=!1)),"Ad"===e.name&&this.handleStartAd(t),"AdWrapper"===e.name&&this.handleStartAdWrapper(t),e.name===L&&(this.advertData.categoryAuthority=t.authority),e.name===x&&(this.advertData.adSystemVersion=t.version),e.name===N&&(this.advertData.advertiserId=t.id),e.name===U&&(this.advertData.surveyType=t.type),e.name===B&&this.handleStartPricing(t),e.name===F&&(this.creativeData.universalAdIdRegistry=t.idRegistry),e.name===j&&this.advertData.extensionStack.push(new b.XmlNode(e.name,(0,P.objectToMap)(t))),e.name===H&&this.handleStartCreative(t),e.name===V&&(this.advertData.currentCreativeType=2,this.creativeData.skipOffset=t.skipoffset),e.name===W&&this.populateIconPropertyList(t),e.name===q&&this.populateIconClickFallbackImagePropertyList(t),e.name===G&&(this.creativeData.adParameters=new m.VASTProperty(G,null,"xmlEncoded",t.xmlEncoded)),e.name===Y&&this.populateInteractiveCreativePropertyList(t),e.name===K&&(this.advertData.currentCreativeType=3),e.name===z&&this.populateNonLinearPropertyList(t),e.name===X&&(this.advertData.currentCreativeType=1,this.advertData.processingCompanionCreative=!0,this.companionAdsData.required=t.required),e.name===Q&&this.populateCompanionPropertyList(t),e.name===J&&this.handleStartStaticResource(t),e.name===Z&&this.handleStartHtmlResource(t),e.name===ee&&this.handleStartTracking(t),e.name===te&&(this.advertData.verificationVendor=t.vendor),e.name===ne&&(this.advertData.verificationApiFramework=t.apiFramework,this.advertData.verificationBrowserOptional=t.browserOptional),e.name===re&&(this.advertData.verificationApiFramework=t.apiFramework,this.advertData.verificationResourceType=t.type),"Extension"===e.name&&this.handleStartExtension(t,e),e.name===ie&&this.addToCreativeExtensionStack(new b.XmlNode(e.name,(0,P.objectToMap)(t))),"CreativeExtension"===e.name&&this.handleStartCreativeExtension(t,e),e.isSelfClosing&&this.onCloseTag(e)}},t.onCloseTag=function(e){if(this.processingAdvertExtensions||this.processingCreativeExtensions)return this.handleEndExtensionElement(e),void(this.characters="");e===R&&this.handleVmapAdBreak(),e===D&&this.handleEndVmapTracking(),"Ad"===e&&this.handleEndAd(),e===x&&this.advertData.properties.push(new m.VASTProperty("AdSystem",this.characters.trim(),"version",this.advertData.adSystemVersion)),"AdTitle"===e&&this.handleEndAdTitle(),"Impression"===e&&this.handleEndImpression(e),e===k&&this.advertData.properties.push(new m.VASTProperty(k,this.characters.trim())),e===L&&this.advertData.properties.push(new m.VASTProperty(L,this.characters.trim(),"authority",this.advertData.categoryAuthority)),e===O&&this.advertData.properties.push(new m.VASTProperty(O,this.characters.trim())),e===N&&this.advertData.properties.push(new m.VASTProperty(N,this.characters.trim(),"id",this.advertData.advertiserId)),e===U&&this.advertData.properties.push(new m.VASTProperty(U,this.characters.trim(),"type",this.advertData.surveyType)),"Error"===e&&this.handleEndError(e),e===B&&this.handleEndPricing(),e===F&&this.handleEndUniversalAdId(),e===j&&this.pop(!0,!1),e===ie&&this.pop(!1,!1),e===te&&this.handleEndVerification(),"VerificationParameters"===e&&(this.advertData.verificationParameters=this.characters.trim()),"MediaFile"===e&&this.handleEndMediaFile(),e===Y&&this.handleEndInteractiveCreativeFile(),"ClickThrough"!==e&&"NonLinearClickThrough"!==e&&"CompanionClickThrough"!==e||(this.creativeData.clickThroughUrl=this.characters.trim()),"IconClickThrough"===e&&(this.iconData.clickThroughUrl=this.characters.trim()),"ClickTracking"===e&&this.handleEndClickTracking(),"NonLinearClickTracking"===e&&this.handleEndNonLinearClickTracking(),"CompanionClickTracking"===e&&this.handleEndCompanionClickTracking(),"IconClickTracking"===e&&this.handleEndIconClickTracking(),e===q&&this.handleEndIconClickFallbackImage(),"AltText"===e&&(this.iconClickFallbackImageData.properties.length>0?this.iconClickFallbackImageData.altText=this.characters.trim():this.creativeData.altText=this.characters.trim()),"CustomClick"===e&&this.handleEndCustomClick(),"IconViewTracking"===e&&this.handleEndIconViewTracking(),e===H&&this.handleEndCreative(),e===V&&this.handleEndLinear(),e===K&&(this.advertData.nonLinearAds=new p.NonLinearAds(this.nonLinearAdsData.trackingMap,this.nonLinearAdsData.nonLinearCreatives),this.nonLinearAdsData.clear()),e===z&&this.handleEndNonLinear(),e===X&&(this.advertData.companionAds=new $.CompanionAds(this.companionAdsData.required,this.companionAdsData.companions),this.companionAdsData.clear(),this.advertData.processingCompanionCreative=!1),e===Q&&this.handleEndCompanion(),e===W&&this.handleEndIcon(),e===G&&this.creativeData.adParameters.setValue(this.characters.trim()),"Duration"===e&&(this.creativeData.duration=this.characters.trim()),"Viewable"!==e&&"NotViewable"!==e&&"ViewUndetermined"!==e||this.handleEndViewableImpression(e),e===J&&this.handleEndStaticResource(),e===Z&&this.handleEndHtmlResource(),"IFrameResource"===e&&this.handleEndIFrameResource(),e===ee&&this.handleEndTracking(),e===ne&&this.handleEndJavaScriptResource(),e===re&&this.handleEndExecutableResource(),"vmap:AdTagURI"===e&&this.handleVmapAdTagURI()},t.onText=function(e){this.characters=e,(this.processingAdvertExtensions||this.processingCreativeExtensions)&&this.handleTextDataForExtensions()},e.parse=function(t,n,r){return new e(n).parse(t,r)},t.parse=function(e,t){var n=this;this.skipNormalisation=!(!t||!t.skipNormalisation)&&t.skipNormalisation;var r=!1;return new Promise((function(t,a){try{var s,u=i.default.parser(!0);if(u.onerror=function(e){r=!0,o.YoLog.e("Failed to parse document: "+e),n.broker.addParsingError(new I.ParsingError(null,I.ParsingError.Message.BAD_XML,e.message)),t(null)},u.ontext=n.onText,u.onopentag=n.onOpenTag,u.onclosetag=n.onCloseTag,u.oncdata=n.onCdata,u.write(e).close(),r)return;if(!n.isVmap)return n.broker.addParsingError(new I.ParsingError(null,I.ParsingError.Message.NO_VMAP)),o.YoLog.e("Failed to parse document. VMAP not found"),void t(null);if(!n.isValidVAST)return n.broker.addParsingError(new I.ParsingError(null,I.ParsingError.Message.INCORRECT_VAST_VERSION,"Version is "+n.adBreakData.vastVersion+", expected >= 4.2")),o.YoLog.e("Failed to parse document. VAST not valid"),void t(null);!function(e){if(o.YoLog.debugflags&o.DebugFlags.DEBUG_PARSING){o.YoLog.d(o.DebugFlags.DEBUG_PARSING,"\n--------------- VMAP PARSING SUMMARY ---------------"),o.YoLog.d(o.DebugFlags.DEBUG_PARSING," * Number of ad breaks: "+e.linearAdBreaks.length),o.YoLog.d(o.DebugFlags.DEBUG_PARSING," * Number of nonlinear ad breaks: "+e.nonLinearAdBreaks.length),o.YoLog.d(o.DebugFlags.DEBUG_PARSING," * Number of display ad breaks: "+e.displayAdBreaks.length),o.YoLog.d(o.DebugFlags.DEBUG_PARSING," * Stream duration: "+e.streamData.duration+"ms\n");for(var t,n=w(e.linearAdBreaks);!(t=n()).done;){var r=t.value;o.YoLog.d(o.DebugFlags.DEBUG_PARSING,r.toString());for(var i,a=w(r.getAdverts());!(i=a()).done;){var s=i.value;o.YoLog.d(o.DebugFlags.DEBUG_PARSING,s.toString())}}for(var u,c=w(e.nonLinearAdBreaks);!(u=c()).done;){var l=u.value;o.YoLog.d(o.DebugFlags.DEBUG_PARSING,l.toString());for(var d,_=w(l.getAdverts());!(d=_()).done;){var f=d.value;o.YoLog.d(o.DebugFlags.DEBUG_PARSING,f.toString())}}for(var h,p=w(e.displayAdBreaks);!(h=p()).done;){var g=h.value;o.YoLog.d(o.DebugFlags.DEBUG_PARSING,g.toString());for(var v,m=w(g.getAdverts());!(v=m()).done;){var y=v.value;o.YoLog.d(o.DebugFlags.DEBUG_PARSING,y.toString())}}e.streamData.getEarlyReturn()&&o.YoLog.d(o.DebugFlags.DEBUG_PARSING,"Early return: "+e.streamData.getEarlyReturn()),o.YoLog.d(o.DebugFlags.DEBUG_PARSING,"--------------- END PARSING SUMMARY ----------------\n")}}(n),s=new C.AnalyticPayload(n,e.toString()),t(s)}catch(e){n.broker.addParsingError(new I.ParsingError(null,I.ParsingError.Message.BAD_XML,e.message)),a(e)}}))},t.parseMapForOnEndTracking=function(e){var t=this.characters.trim(),n=e.get(this.creativeData.trackingEvent);n?n.addTrackingUrl(t):(n=-1!==this.creativeData.trackingEvent.indexOf("progress")?new S.TrackingReport("progress",[t]):new S.TrackingReport(this.creativeData.trackingEvent,[t]),e.set(this.creativeData.trackingEvent,n))},t.pop=function(e,t){var n=[],r=(n=e?this.advertData.extensionStack:this.advertData.processingCompanionCreative?this.creativeData.companionExtensionStack:this.creativeData.extensionStack).pop();t?n[n.length-1].addChild(r):e?this.advertData.extensions=r:this.advertData.processingCompanionCreative?this.creativeData.companionExtensions=r:this.creativeData.extensions=r},t.populateCompanionProperty=function(e,t){this.populateCreativeProperty(e,t)},t.populateCompanionPropertyList=function(e){this.populateCompanionProperty(e,"id"),this.populateCompanionProperty(e,"width"),this.populateCompanionProperty(e,"height"),this.populateCompanionProperty(e,"assetWidth"),this.populateCompanionProperty(e,"assetHeight"),this.populateCompanionProperty(e,"expandedWidth"),this.populateCompanionProperty(e,"expandedHeight"),this.populateCompanionProperty(e,"apiFramework"),this.populateCompanionProperty(e,"adSlotId"),this.populateCompanionProperty(e,"pxratio"),this.populateCompanionProperty(e,"renderingMode")},t.populateCreativeProperty=function(e,t){var n=e[t];(0,T.isNullOrEmpty)(n)||this.creativeData.properties.push(new m.VASTProperty(t,n))},t.populateIconProperty=function(e,t){var n=e[t];(0,T.isNullOrEmpty)(n)||this.iconData.properties.push(new m.VASTProperty(t,n))},t.populateIconPropertyList=function(e){this.populateIconProperty(e,"width"),this.populateIconProperty(e,"height"),this.populateIconProperty(e,"program"),this.populateIconProperty(e,"xPosition"),this.populateIconProperty(e,"yPosition"),this.populateIconProperty(e,"offset"),this.populateIconProperty(e,"duration"),this.populateIconProperty(e,"apiFramework"),this.populateIconProperty(e,"pxratio")},t.populateIconClickFallbackImageProperty=function(e,t){var n=e[t];(0,T.isNullOrEmpty)(n)||this.iconClickFallbackImageData.properties.push(new m.VASTProperty(t,n))},t.populateIconClickFallbackImagePropertyList=function(e){this.populateIconClickFallbackImageProperty(e,"width"),this.populateIconClickFallbackImageProperty(e,"height")},t.populateInteractiveCreativeProperty=function(e,t){this.populateCreativeProperty(e,t)},t.populateInteractiveCreativePropertyList=function(e){this.populateInteractiveCreativeProperty(e,"apiFramework"),this.populateInteractiveCreativeProperty(e,"type");var t=e.variableDuration;(0,T.isNullOrEmpty)(t)?this.creativeData.properties.push(new m.VASTProperty("variableDuration","false")):this.populateInteractiveCreativeProperty(e,"variableDuration")},t.populateNonLinearProperty=function(e,t){this.populateCreativeProperty(e,t)},t.populateNonLinearPropertyList=function(e){this.populateNonLinearProperty(e,"id"),this.populateNonLinearProperty(e,"width"),this.populateNonLinearProperty(e,"height"),this.populateNonLinearProperty(e,"expandedWidth"),this.populateNonLinearProperty(e,"expandedHeight"),this.populateNonLinearProperty(e,"scalable"),this.populateNonLinearProperty(e,"maintainAspectRatio"),this.populateNonLinearProperty(e,"apiFramework"),this.populateNonLinearProperty(e,"minSuggestedDuration")},e}();t.Parser=fe},6161:(e,t,n)=>{"use strict";t.__esModule=!0,t.PlaylistPayload=void 0;var r=n(1289),i=function(){function e(e,t){this.sessionIdentifier=e.get(r.Payload.IDENTIFIER),this.location=e.get(r.Payload.LOCATION),this.analyticUrl=e.get(r.Payload.ANALYTICURL),this.pauseUrl=e.get(r.Payload.PAUSEURL),this.availabilityStartTime=e.get(r.Payload.AVAILABILITYSTART)||null,this.interSegmentTimeout=t}var t=e.prototype;return t.getAnalyticUrl=function(){return this.analyticUrl},t.getIntersegmentTimeout=function(){return this.interSegmentTimeout},t.getPlaybackUrl=function(){return this.location},t.getPauseUrl=function(){return this.pauseUrl},t.getSessionIdentifier=function(){return this.sessionIdentifier},t.getAvailabilityStartTime=function(){return this.availabilityStartTime},e}();t.PlaylistPayload=i},3730:(e,t)=>{"use strict";t.__esModule=!0,t.XmlValidation=void 0;var n=function(){function e(){if((this instanceof e?this.constructor:void 0)===e)throw new TypeError("Cannot construct abstract class XmlValidation directly")}return e.prototype.isValid=function(){return!0},e}();t.XmlValidation=n},7995:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}t.__esModule=!0,t.AdBreakEventHandler=void 0;var i=function(e){var t,n;function i(){return e.apply(this,arguments)||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n),i.prototype.onNonLinearTrackingEvent=function(e){throw new Error("Function must be overridden")},i}(n(3730).XmlValidation);t.AdBreakEventHandler=i},7196:(e,t,n)=>{"use strict";t.__esModule=!0,t.ViewableEvent=t.AdvertEventHandler=void 0;var r=n(3730);function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}var o=Object.freeze({VIEWABLE:0,NOT_VIEWABLE:1,VIEW_UNDETERMINED:2});t.ViewableEvent=o;var a=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n);var o=r.prototype;return o.onViewableEvent=function(e){throw new Error("Function must be overridden")},o.onErrorEvent=function(e){throw new Error("Function must be overridden")},o.onImpressionEvent=function(){throw new Error("Function must be overridden")},r}(r.XmlValidation);t.AdvertEventHandler=a},4843:(e,t,n)=>{"use strict";t.__esModule=!0,t.AnalyticEventObserver=void 0,n(6366),n(1235),n(6822);var r=function(){function e(){}var t=e.prototype;return t.onAdvertBreakStart=function(e,t){throw new Error("Function must be overridden")},t.onAdvertBreakEnd=function(e){throw new Error("Function must be overridden")},t.onAdvertBreakEarlyReturn=function(e,t){throw new Error("Function must be overridden")},t.onAdvertEnd=function(e){throw new Error("Function must be overridden")},t.onAdvertStart=function(e,t){throw new Error("Function must be overridden")},t.onAnalyticUpdate=function(e){throw new Error("Function must be overridden")},t.onTrackingEvent=function(e,t){throw new Error("Function must be overridden")},t.onSessionError=function(e,t){throw new Error("Function must be overridden")},e}();t.AnalyticEventObserver=r},4796:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}t.__esModule=!0,t.CreativeEventHandler=void 0;var i=function(e){var t,n;function i(){return e.apply(this,arguments)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n);var o=i.prototype;return o.onClickThrough=function(){throw new Error("Function must be overridden")},o.onTrackingEvent=function(e){throw new Error("Function must be overridden")},o.setVisible=function(e){throw new Error("Function must be overridden")},i}(n(3730).XmlValidation);t.CreativeEventHandler=i},7351:(e,t,n)=>{"use strict";t.__esModule=!0,t.ParsingError=void 0;var r=n(597),i=n(3755);function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}var a=function(e){var t,n;function a(t,n,o){var a;(a=e.call(this,(0,i.millisToTimestamp)(Date.now()))||this).message=n;var s=(0,r.isNullOrEmpty)(o)?n:o;return s+=(0,r.isNullOrEmpty)(t)?"":" (breakId: "+t+")",a.errorDetail=s,a}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,o(t,n);var s=a.prototype;return s.getMessage=function(){return this.message},s.getErrorDetail=function(){return this.errorDetail},a}(n(4281).SessionError);t.ParsingError=a,a.Message=Object.freeze({BAD_XML:"XML is not well-formed",NO_VMAP:"Document is not VMAP",INCORRECT_VAST_VERSION:"Incorrect VAST version",INVALID_DURATION:"Invalid duration",INVALID_START_TIME:"Invalid start time",EMPTY_ADVERT_AND_TRACKING:"No adverts or tracking",INVALID_MEDIAID:"Yospace media id not found",MISSING_CREATIVE:"Missing Linear Creative",INVALID_TRACKING_URL:"Invalid tracking URL"})},5719:(e,t,n)=>{"use strict";t.__esModule=!0,t.ViewSize=t.PlayerEvent=t.PlaybackEventHandler=void 0;var r=n(6037);function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}n(4672);var o=Object.freeze({START:0,STOP:1,PAUSE:2,RESUME:3,STALL:4,CONTINUE:5,ADVERT_REWIND:6,ADVERT_SKIP:7,SEEK:8,PLAYBACK_READY:9});t.PlayerEvent=o;var a=Object.freeze({COLLAPSED:0,EXPANDED:1});t.ViewSize=a;var s=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n);var o=r.prototype;return o.onPlayerEvent=function(e,t){throw new Error("Function must be overridden")},o.onPlayheadUpdate=function(e){throw new Error("Function must be overridden")},o.onTimedMetadata=function(e){throw new Error("Function must be overridden")},o.onViewSizeChange=function(e){throw new Error("Function must be overridden")},o.onVolumeChange=function(e){throw new Error("Function must be overridden")},r}(r.PlaybackPolicy);t.PlaybackEventHandler=s},6037:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}t.__esModule=!0,t.PlaybackPolicy=void 0;var i=function(e){var t,n;function i(){return e.apply(this,arguments)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n);var o=i.prototype;return o.canStop=function(){throw new Error("Function must be overridden")},o.canPause=function(){throw new Error("Function must be overridden")},o.canSkip=function(){throw new Error("Function must be overridden")},o.willSeekTo=function(e){throw new Error("Function must be overridden")},o.canChangeVolume=function(e){throw new Error("Function must be overridden")},o.canResize=function(e){throw new Error("Function must be overridden")},o.canResizeCreative=function(e){throw new Error("Function must be overridden")},o.canClickThrough=function(e){throw new Error("Function must be overridden")},i}(n(3730).XmlValidation);t.PlaybackPolicy=i},1498:(e,t,n)=>{"use strict";t.__esModule=!0,t.PlaybackPolicyHandler=void 0,n(6822);var r=function(){function e(){}var t=e.prototype;return t.canStop=function(e,t){throw new Error("Must be overridden")},t.canPause=function(e,t){throw new Error("Must be overridden")},t.canSkip=function(e,t,n){throw new Error("Must be overridden")},t.willSeekTo=function(e,t,n){throw new Error("Must be overridden")},t.canChangeVolume=function(e,t,n){throw new Error("Must be overridden")},t.canResize=function(e,t,n){throw new Error("Must be overridden")},t.canResizeCreative=function(e,t,n){throw new Error("Must be overridden")},t.canClickThrough=function(e,t,n){throw new Error("Must be overridden")},t.setPlaybackMode=function(e){throw new Error("Must be overridden")},t.didSkip=function(e,t,n){throw new Error("Must be overridden")},t.didSeek=function(e,t,n){throw new Error("Must be overridden")},e}();t.PlaybackPolicyHandler=r},6822:(e,t,n)=>{"use strict";t.__esModule=!0,t.UNKNOWN_FORMAT=t.SessionState=t.SessionProperties=t.SessionErrorCode=t.Session=t.PlaybackMode=t.PARTIAL_VMAP=t.NO_DVRLIVE=t.MALFORMED_URL=t.INVALID_WINDOW=t.FALLBACK_URL=t.CONNECTION_TIMEOUT=t.CONNECTION_ERROR=void 0;var r=n(1289),i=n(2385),o=n(2971),a=n(1235),s=n(7823),u=n(597),c=n(1862),l=n(5719),d=n(868),_=n(5406),f=n(353),h=n(936),p=(n(4843),n(6366),n(6474));function g(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&this.getReportsManager().raiseSessionErrorCallback(E.PARSING_ERROR,this)):s.YoLog.e("addAnalyticObserver: observer was null")},v.addParsingError=function(e){this.parsingErrors.push(e)},v.addTrackingError=function(e){this.trackingErrors.push(e)},v.clearTrackingErrors=function(){this.trackingErrors=[]},v.analyticsSuppressed=function(){return this.reportsManager.reportsSuppressed()},v.adjustForEarlyReturn=function(e){var t=this.getAdBreakForPlayhead(e);t&&t.adjustForEarlyReturn(e)&&(this.getReportsManager().raiseAdBreakEarlyReturn(t,this),t.isValid()||this.linearAdBreaks.splice(this.linearAdBreaks.indexOf(t)))},v.canChangeVolume=function(e){var t=(0,d.raiseCallback)(this.policyHandler,this.policyHandler.canChangeVolume,e,this.playhead,this.linearAdBreaks);return null===t&&(t=this.defaultPolicyHandler.canChangeVolume(e,this.playhead,this.linearAdBreaks)),t},v.canClickThrough=function(e){var t=(0,d.raiseCallback)(this.policyHandler,this.policyHandler.canClickThrough,e,this.playhead,this.linearAdBreaks);return null===t&&(t=this.defaultPolicyHandler.canClickThrough(e,this.playhead,this.linearAdBreaks)),t},v.canPause=function(){var e=(0,d.raiseCallback)(this.policyHandler,this.policyHandler.canPause,this.playhead,this.linearAdBreaks);return null===e&&(e=this.defaultPolicyHandler.canPause(this.playhead,this.linearAdBreaks)),e},v.canResize=function(e){var t=(0,d.raiseCallback)(this.policyHandler,this.policyHandler.canResize,e,this.playhead,this.linearAdBreaks);return null===t&&(t=this.defaultPolicyHandler.canResize(e,this.playhead,this.linearAdBreaks)),t},v.canResizeCreative=function(e){var t=(0,d.raiseCallback)(this.policyHandler,this.policyHandler.canResizeCreative,e,this.playhead,this.linearAdBreaks);return null===t&&(t=this.defaultPolicyHandler.canResizeCreative(e,this.playhead,this.linearAdBreaks)),t},v.canSkip=function(){var e=(0,d.raiseCallback)(this.policyHandler,this.policyHandler.canSkip,this.playhead,this.linearAdBreaks,0);return null===e&&(e=this.defaultPolicyHandler.canSkip(this.playhead,this.linearAdBreaks,0)),e},v.canStop=function(){var e=(0,d.raiseCallback)(this.policyHandler,this.policyHandler.canStop,this.playhead,this.linearAdBreaks);return null===e&&(e=this.defaultPolicyHandler.canStop(this.playhead,this.linearAdBreaks)),e},v.clearParsingErrors=function(){this.parsingErrors=[]},v.completeWithStatus=function(e,t){this.setState(e),this.setResultCode(t),e===S.INITIALISED&&s.YoLog.trace("sessionStart")},v.fireImpressionReport=function(){var e=this.currentAdvert;if(e&&e.isActive()){var t=e.getImpressions(!0);if(t){s.YoLog.trace("impression");var n=new c.TrackingReport(t.trackingEvent,t.trackingUrls),r=new i.ReportingParams(this.getPlayhead(),e.getStart(),e.getLinearCreative().getAssetUri(),e.getMacroSubstitutions());this.reportsManager.fireBeacon(n,r),t.removeTrackingUrls()}}},v.fireTrackingReport=function(e){var t=null,n=null,r=null,o=this.getCurrentAdvert();o&&(t=o.getStart(),o.getLinearCreative()&&(n=o.getLinearCreative().getAssetUri()),r=o.getMacroSubstitutions()),s.YoLog.trace("trackingEvent "+e.getEventType());var a=new i.ReportingParams(this.getPlayhead(),t,n,r);this.reportsManager.fireBeacon(e,a)},v.fireTrackingReportForCreative=function(e,t){var n=null,r=this.getAdvertForCreative(t);if(r){r.getLinearCreative()&&(n=r.getLinearCreative().getAssetUri()),s.YoLog.trace("trackingEvent "+e.getEventType());var o=new i.ReportingParams(this.getPlayhead(),r.getStart(),n,r.getMacroSubstitutions());this.reportsManager.fireBeacon(e,o)}},v.fireTrackingReportForIcon=function(e,t){var n=null,r=this.currentAdvert;if(r&&r.isActive()&&r.containsIcon(t)){r.getLinearCreative()&&(n=r.getLinearCreative().getAssetUri()),s.YoLog.trace("trackingEvent "+e.getEventType());var o=new i.ReportingParams(this.getPlayhead(),r.getStart(),n,r.getMacroSubstitutions());this.reportsManager.fireBeacon(e,o)}},v.getAdBreakForPlayhead=function(e){for(var t,n=g(this.linearAdBreaks);!(t=n()).done;){var r=t.value;if(r.getStart()<=e&&ee||e-s=5e3)&&(s.YoLog.trace("sdk playhead "+e),this.lastTraced=e),this.lastPlayed=this.playhead,this.playhead=e},v.onSessionError=function(e){s.YoLog.trace("sessionerror "+e),s.YoLog.e("Yospace session has expired"),e===E.TIMEOUT&&this.setState(S.SHUTDOWN),this.getReportsManager().raiseSessionErrorCallback(e,this)},v.onTimedMetadata=function(e){},v.onViewSizeChange=function(e){switch(e){case l.ViewSize.EXPANDED:this.signalActionTrackingEvent("playerExpand");break;case l.ViewSize.COLLAPSED:this.signalActionTrackingEvent("playerCollapse");break;default:s.YoLog.w("Unknown ViewSize: "+(0,h.getKeyFromValue)(e,l.ViewSize))}},v.onVolumeChange=function(e){var t=e?"mute":"unmute";this.signalActionTrackingEvent(t)},v.raiseTrackingCallbackForCreative=function(e,t){this.getAdvertForCreative(t)&&(s.YoLog.trace("trackingEvent "+e),this.getReportsManager().raiseTrackingCallback(e,this))},v.removeAllNonLinearAdBreaks=function(){this.nonLinearAdBreaks=[],this.displayAdBreaks=[]},v.removeAnalyticObserver=function(e){this.reportsManager.removeAnalyticObserver(e)},v.removeNonLinearAdBreak=function(e){for(var t=0;t0&&this.reportsManager.fireBeacons(n,r),"closeLinear"!==e&&this.reportsManager.raiseTrackingCallback(e,this)}},v.signalNonLinearTrackingEvent=function(e){var t=this.currentAdvert;if(t&&t.isActive()&&!t.isFiller()&&!(0,u.isNullOrEmpty)(e)){s.YoLog.trace("nonlinearTrackingEvent "+e);var n=t.getTrackingReportLinear(e);if(n){var r=new i.ReportingParams(this.getPlayhead(),t.getStart(),t.getLinearCreative().getAssetUri(),t.getMacroSubstitutions());this.reportsManager.fireBeacon(n,r)}this.reportsManager.raiseTrackingCallback(e,this)}},v.signalTimelineTrackingEvents=function(e){var t=this.currentAdvert;if(t&&t.isActive()&&!t.isFiller()){for(var n,o=new i.ReportingParams(this.getPlayhead(),t.getStart(),t.getLinearCreative().getAssetUri(),t.getMacroSubstitutions()),a=[],u=g(t.getTrackingSchedule());!(n=u()).done;){var c=n.value,l=c[0],d=c[1];if(e+r.Constant.EVENT_CUEPOINT_TOL>=l){s.YoLog.d(s.DebugFlags.DEBUG_REPORTS,"Tracking schedule entry retrieved: "+d),a.push(l);var _=t.getTrackingReportLinear(d);_&&this.reportsManager.fireBeacon(_,o);var f=-1!==d.indexOf("progress")?"progress":d;s.YoLog.trace("timelineEvent "+f),this.reportsManager.raiseTrackingCallback(f,this)}}this.removeKeysFromTrackingSchedule(a)}},v.signalTrackingEvent=function(e,t){var n=this.currentAdvert;if(n&&n.isActive()&&!n.isFiller()&&!(0,u.isNullOrEmpty)(e)){if(s.YoLog.trace("trackingEvent"+e),t){var r=new i.ReportingParams(this.getPlayhead(),n.getStart(),n.getLinearCreative().getAssetUri(),n.getMacroSubstitutions());this.reportsManager.fireBeacon(t,r)}this.reportsManager.raiseTrackingCallback(e,this)}},v.suppressAnalytics=function(e){if(this.reportsManager.suppressReports(e),!e&&this.currentAdBreak){var t=this.currentAdBreak.getTrackingReport("breakStart",!0);this.getReportsManager().fireBeacon(t,new i.ReportingParams(this.getPlayhead()))}},v.willSeekTo=function(e){return this.policyHandler?(0,d.raiseCallback)(this.policyHandler,this.policyHandler.willSeekTo,e,this.linearAdBreaks,this.getPlayhead()):e},o}(o.AnalyticBroker);t.Session=$;var T=function(){function e(e){this.requestTimeout=e&&e.requestTimeout?e.requestTimeout:r.Constant.REQUEST_TIMEOUT,this.resourceTimeout=e&&e.resourceTimeout?e.resourceTimeout:r.Constant.REQUEST_TIMEOUT,this.userAgent=e?e.userAgent:"",this.prefetchResources=!!e&&e.prefetchResources,this.fireHistoricalBeacons=!e||e.fireHistoricalBeacons,this.eventCategories=e?e.eventCategories:0,this.allowCorsForAnalytics=!!e&&e.allowCorsForAnalytics,this.setCustomHttpHeaders(e?e.customHttpHeaders:new Map),this.useHttps=!!e&&e.useHttps,this.consecutiveBreakTolerance=e?e.consecutiveBreakTolerance:0,this.token=e?e.token:Math.floor(1e8*Math.random())}var t=e.prototype;return t.excludeFromSuppression=function(e){this.eventCategories=e},t.getCustomHttpHeaders=function(){return this.customHttpHeaders},t.getExcludedCategories=function(){return this.eventCategories},t.getFireHistoricalBeacons=function(){return this.fireHistoricalBeacons},t.getPrefetchResources=function(){return this.prefetchResources},t.getRequestTimeout=function(){return this.requestTimeout},t.getResourceTimeout=function(){return this.resourceTimeout},t.getUserAgent=function(){return this.userAgent},t.getToken=function(){return this.token},t.getAllowCorsForAnalytics=function(){return this.allowCorsForAnalytics},t.getApplyEncryptedTracking=function(){return this.useHttps},t.getConsecutiveBreakTolerance=function(){return this.consecutiveBreakTolerance},t.setAllowCorsForAnalytics=function(e){this.allowCorsForAnalytics=e},t.setApplyEncryptedTracking=function(e){this.useHttps=e},t.setConsecutiveBreakTolerance=function(e){this.consecutiveBreakTolerance=e},t.setCustomHttpHeaders=function(e){if(e)for(var t,n=g(e);!(t=n()).done;){var r=t.value[0];"USER-AGENT"===r.toUpperCase()&&(s.YoLog.w("SessionProperties: 'User-Agent' ignored"),e.delete(r))}else e=new Map;this.customHttpHeaders=e},t.setFireHistoricalBeacons=function(e){this.fireHistoricalBeacons=e},t.setPrefetchResources=function(e){this.prefetchResources=e},t.setRequestTimeout=function(e){this.requestTimeout=e},t.setResourceTimeout=function(e){this.resourceTimeout=e},t.setToken=function(e){this.token=e},t.setUserAgent=function(e){this.userAgent=e},t.toString=function(){return"Session Properties:\n allowCorsForAnalytics: "+this.allowCorsForAnalytics+"\n applyEncryptedTracking: "+this.useHttps+"\n consecutiveBreakTolerance: "+this.consecutiveBreakTolerance+"\n customHttpHeaders: "+(0,h.mapToString)(this.customHttpHeaders)+"\n eventCategories: "+this.eventCategories+"\n fireHistoricalBeacons: "+this.fireHistoricalBeacons+"\n prefetchResources: "+this.prefetchResources+"\n requestTimeout: "+this.requestTimeout+"\n resourceTimeout: "+this.resourceTimeout+"\n userAgent: "+this.userAgent+"\n token: "+this.token},e}();t.SessionProperties=T},6619:(e,t,n)=>{"use strict";t.__esModule=!0,t.SessionDVRLive=void 0;var r=n(4409),i=n(4485),o=n(7461),a=n(1622),s=n(9513),u=n(191),c=n(6028),l=n(5406),d=n(597),_=n(7823),f=n(5719),h=n(6822),p=n(868),g=n(1289),v=n(353);function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0;n--){var r=this.linearAdBreaks[n];if(r.getStart()+r.getDuration()<=e){if(_.YoLog.d(_.DebugFlags.DEBUG_LIFECYCLE,"Removing ad break. Start: "+r.getStart()+"; duration: "+r.getDuration()),r===t){_.YoLog.d(_.DebugFlags.DEBUG_LIFECYCLE,"Removing the current adbreak");var i=t.getAdvertFromPlayhead(this.getPlayhead());i&&i.setInactive(),this.onAdvertEnd(),this.onAdvertBreakEnd()}this.linearAdBreaks.splice(n,1)}}},b.shutdown=function(){e.prototype.shutdown.call(this),this.analyticPoller&&(this.analyticPoller.shutdown(),this.analyticPoller=null),this.pausePoller&&(this.pausePoller.shutdown(),this.pausePoller=null),_.YoLog.d(_.DebugFlags.DEBUG_LIFECYCLE,"resources released")},b.getPlaybackMode=function(){return h.PlaybackMode.DVRLIVE},b.initialisePoller=function(){var e=this;this.getAnalyticsUrl()&&this.pauseUrl&&this.getSessionState()===h.SessionState.INITIALISED&&(this.analyticPoller=new u.UrlPoller(this.getAnalyticsUrl(),this.getSessionProperties().getRequestTimeout(),(function(t,n){400===t.status?e.onSessionError(h.SessionErrorCode.TIMEOUT):t.ok&&(e.targetDuration=n,e.parseAnalyticPayload(t.body))})),this.pausePoller=new u.UrlPoller(this.pauseUrl,this.getSessionProperties().getRequestTimeout(),null))},b.hasAnalyticUpdateChanged=function(e){return!this.getLastAnalyticUpdate()||!this.getLastAnalyticUpdate().isEqualTo(e)||(_.YoLog.d(_.DebugFlags.DEBUG_PARSING,"Content unchanged. Analytic update not delivered"),!1)},b.adjustForPdtInitial=function(e){if(this.streamStart===h.INVALID_WINDOW){var t=e.getPdtInitial();null!==t&&(this.streamStart=t,this.manifestData.get("availabilityStartTime")||this.manifestData.set("availabilityStartTime",new Date(t)))}},b.handlePdtStartEnd=function(e){var t=!1,n=e.getPdtStart(),r=e.getPdtEnd();if(null!==n&&null!==r){var i=n,o=r;this.streamStart===h.INVALID_WINDOW&&(this.streamStart=i);var a=i-this.streamStart,s=o-this.streamStart;a===this.windowStart&&s===this.windowEnd||(t=!0,this.windowStart=a,this.windowEnd=s,this.windowSize=this.windowEnd-this.windowStart)}else _.YoLog.w("PDT start/end value(s) invalid or missing");return t},b.updateAdBreaks=function(e){var t=e.getLinearAdBreaks(),n=e.getNonLinearAdBreaks(),r=e.getDisplayAdBreaks(),i=t.length,o=n.length,a=r.length;Array.prototype.push.apply(this.linearAdBreaks,t),Array.prototype.push.apply(this.nonLinearAdBreaks,n),this.streamStart===h.INVALID_WINDOW?_.YoLog.d(_.DebugFlags.DEBUG_PARSING,"Received "+i+" linear, "+o+" nonlinear "+a+" display ad breaks"):_.YoLog.d(_.DebugFlags.DEBUG_PARSING,"Received: "+i+" linear, "+o+" nonlinear "+a+" display ad breaks. New window start: "+this.windowStart+", end: "+this.windowEnd+" (total: "+this.windowSize+")"),this.removeExpiredAdBreaks()},b.parseAnalyticPayload=function(e){var t=this;return this.clearParsingErrors(),c.Parser.parse(e,this).then((function(e){if(t.parsingErrors.length>0&&t.getReportsManager().raiseSessionErrorCallback(h.SessionErrorCode.PARSING_ERROR,t),!e)return null;if(!t.hasAnalyticUpdateChanged(e))return e;var n=e.getEarlyReturn();n&&-1!==n&&t.adjustForEarlyReturn(n),t.adjustForPdtInitial(e);var r=t.handlePdtStartEnd(e);return t.updateAdBreaks(e),(t.streamStart!==h.INVALID_WINDOW&&r||e.hasAdBreaks())&&(_.YoLog.trace("sdk analytics "+e.getLinearAdBreaks().length+" "+e.getNonLinearAdBreaks().length+" "+e.getDisplayAdBreaks().length+" "+t.getDuration()),t.setLastAnalyticUpdate(e),t.getReportsManager().raiseAnalyticUpdateCallback(t)),e})).catch((function(e){_.YoLog.d(_.DebugFlags.DEBUG_POLLING,"Analytic Poll completed with unreadable data: "+e),t.parsingErrors.length>0&&t.getReportsManager().raiseSessionErrorCallback(h.SessionErrorCode.PARSING_ERROR,t)}))},b.setAdBreaksInactivePriorTo=function(e){for(var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.linearAdBreaks);!(t=n()).done&&t.value.setAdvertsInactivePriorTo(e););},b.setStreamStart=function(e){this.streamStart=e},b.parseManifestResponse=function(e,t){var n=e;return a.HlsManifestParser.isHlsManifest(n)?(_.YoLog.d(_.DebugFlags.DEBUG_PARSING,"Processing HLS master manifest: "+t),a.HlsManifestParser.parse(n)):(_.YoLog.d(_.DebugFlags.DEBUG_PARSING,"Processing DASH manifest: "+t),i.DashManifestParser.parse(n))},b.initialiseFromPayload=function(e){e?(0,d.isNullOrEmpty)(e.getAnalyticUrl())?(_.YoLog.w("Analytics URL not found in manifest payload"),this.completeWithStatus(h.SessionState.NO_ANALYTICS,0)):(0,l.getUrl)(e.getAnalyticUrl())?(0,l.getUrl)(e.getPlaybackUrl())?(this.setPlaybackUrl(e.getPlaybackUrl()),(0,d.isNullOrEmpty)(e.getPauseUrl())?(_.YoLog.e("Pause URL not found in manifest"),this.completeWithStatus(h.SessionState.NO_ANALYTICS,h.NO_DVRLIVE)):(0,l.getUrl)(e.getPauseUrl())?(this.setIdentifier(e.getSessionIdentifier()),this.setAnalyticsUrl(e.getAnalyticUrl()),this.pauseUrl=e.getPauseUrl(),this.manifestData.set("availabilityStartTime",e.getAvailabilityStartTime()),this.completeWithStatus(h.SessionState.INITIALISED,0),_.YoLog.d(_.DebugFlags.DEBUG_LIFECYCLE,"Successful. Url: "+this.getPlaybackUrl())):(_.YoLog.w("Malformed pause URL in manifest"),this.completeWithStatus(h.SessionState.NO_ANALYTICS,h.NO_DVRLIVE))):(_.YoLog.w("Player URL is invalid: "+e.getPlaybackUrl()),this.completeWithStatus(h.SessionState.NO_ANALYTICS,h.MALFORMED_URL)):(_.YoLog.w("Malformed analytics URL in manifest"),this.completeWithStatus(h.SessionState.NO_ANALYTICS,h.MALFORMED_URL)):(_.YoLog.e("Unable to process master manifest"),this.completeWithStatus(h.SessionState.NO_ANALYTICS,h.UNKNOWN_FORMAT))},b.onPlaybackStart=function(t){this.isNotPlaying()?this.getSessionState()!==h.SessionState.INITIALISED?_.YoLog.w("Reporting START when session is not initialised"):this.analyticPoller&&(e.prototype.onPlaybackStart.call(this,t),this.analyticPoller.start()):_.YoLog.w("Reporting START when start has already been reported")},b.onPlaybackReady=function(){e.prototype.onPlaybackReady.call(this),this.getSessionState()===h.SessionState.INITIALISED&&!0!==this.playing&&this.analyticPoller&&this.analyticPoller.request()},b.onPlaybackPause=function(){this.isNotPlaying()||this.pausePoller&&this.getSessionState()===h.SessionState.INITIALISED&&this.pausePoller.start(),e.prototype.onPlaybackPause.call(this)},b.onPlaybackResume=function(){this.isNotPlaying()&&this.pausePoller&&this.pausePoller.stop(),e.prototype.onPlaybackResume.call(this)},b.onPlayerEvent=function(t,n){t!==f.PlayerEvent.SEEK&&t!==f.PlayerEvent.ADVERT_SKIP&&t!==f.PlayerEvent.ADVERT_REWIND||(this.didSeek=!0),e.prototype.onPlayerEvent.call(this,t,n)},b.onPlayheadUpdate=function(t){this.handleHeartbeat(t),e.prototype.onPlayheadUpdate.call(this,t)},b.canPause=function(){return this.streamStart!==h.INVALID_WINDOW&&e.prototype.canPause.call(this)},b.canSkip=function(){if(this.streamStart===h.INVALID_WINDOW)return-1;if(this.policyHandler){var e=(0,p.raiseCallback)(this.policyHandler,this.policyHandler.canSkip,this.getPlayhead(),this.linearAdBreaks,this.getDuration());return null===e&&(e=this.defaultPolicyHandler.canSkip(this.getPlayhead(),this.linearAdBreaks,this.getDuration())),e}return 0},b.willSeekTo=function(t){return this.streamStart===h.INVALID_WINDOW?this.getPlayhead():e.prototype.willSeekTo.call(this,t)},r}(r.SessionSeekable);t.SessionDVRLive=b},2326:(e,t,n)=>{"use strict";t.__esModule=!0,t.SessionLive=void 0;var r=n(1289),i=n(4485),o=n(353),a=n(7461),s=n(6822),u=n(7823),c=n(597),l=n(2385),d=n(1622),_=n(4672),f=n(9513),h=n(5406),p=n(191),g=n(6028);function v(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0)for(var t,n=e.getMediaIdentifier(),r=v(this.linearAdBreaks);!(t=r()).done;){var i=t.value;if(i.getAdvertFromIdentifier(n))return i}return null},S.getFirstAdvertRemovingAllPrevious=function(e){if(0===this.linearAdBreaks.length)return null;for(var t=null,n=-1,r=0;r0&&this.linearAdBreaks.splice(0,n),t},S.getMetadataTimeout=function(e){return e&&e.getTypeWithinSegment()===_.TypeWithinSegment.END?this.interSegmentTimeout:Math.max(this.targetDuration+1e3>>1,r.Constant.MIN_INTRASEGMENT_TIMEOUT)},S.getPlaybackMode=function(){return s.PlaybackMode.LIVE},S.handleMetaDataInSequence=function(e,t){var n=this.getCurrentAdvert();if(t.isFirstInSequence())this.onAdvertStart(e,t.getPlayhead());else if(t.isLastInSequence())!n||n.isFiller()&&!this.hasAdvertExpired(n,t)||this.onAdvertEnd(b.PLAYED_OUT);else if(n)if(t.isLastInSegment()&&(n.isFiller()||n.isTruncated())&&this.hasAdvertExpired(n,t))u.YoLog.d(u.DebugFlags.DEBUG_STATE_MACHINE,"Filler expired or truncated advert completed. Ending advert and ad break"),this.onAdvertEnd(b.PLAYED_OUT);else{var r=Math.max(t.getPlayhead()-n.getStart(),0);this.signalTimelineTrackingEvents(r)}else this.onAdvertBreakStart(e)},S.handleMetaDataOutOfSequence=function(e,t){var n=this.getCurrentAdvert();n?n.getMediaIdentifier()!==e.getMediaIdentifier()&&(this.onAdvertEnd(b.NOT_PLAYED_OUT),t.isFirstInSequence()?this.onAdvertStart(e,t.getPlayhead()):(t.isLastInSequence()||(e.isFiller()||e.isTruncated())&&t.isLastInSegment()&&this.hasAdvertExpired(e,t))&&(e.setInactive(),this.getCurrentAdBreak().isActive()||this.onAdvertBreakEnd())):t.isFirstInSequence()?this.onAdvertStart(e,t.getPlayhead()):this.scheduleAdvertBreakEnd(this.interSegmentTimeout)},S.hasAdvertExpired=function(e,t){var n=this.interSegmentTimeout,r=t.getPlayhead()-e.getStart()+n;return u.YoLog.d(u.DebugFlags.DEBUG_STATE_MACHINE,"("+(e.isFiller()?"FILLER":"ADVERT")+" CHECK): Ad duration: "+e.getDuration()+", elapsed: "+(t.getPlayhead()-e.getStart()+this.interSegmentTimeout)),r>=e.getDuration()},S.initialiseFromSession=function(e){var t=this;return new Promise((function(n,r){return u.YoLog.trace("sdk init"),(0,h.getUrl)(e)?f.HttpConnection.get(e,{method:"GET"},t.sessionProperties.getRequestTimeout(),t.sessionProperties.getCustomHttpHeaders()).then((function(i){if(i.ok){var o=i.headers.get("content-type");if(o&&o.toLowerCase().includes("application/json"))t.handleFallbackUrl(i.body)?n(t):r(t);else{var a=i.url?i.url:e;t.parseManifestResponse(i.body,a),t.getSessionState()===s.SessionState.INITIALISED&&t.initialisePoller(),n(t)}}else i.timeout?(u.YoLog.e("Primary Url request failed: "+e+", reason: timeout"),t.completeWithStatus(s.SessionState.FAILED,s.CONNECTION_TIMEOUT)):(u.YoLog.e("Primary Url request failed: "+e+", status: "+i.status+", error: "+i.statusText),t.completeWithStatus(s.SessionState.FAILED,i.status)),r(t)})):(t.completeWithStatus(s.SessionState.FAILED,s.MALFORMED_URL),void r(t))}))},S.initialisePoller=function(){var e=this;this.getAnalyticsUrl()&&this.getSessionState()===s.SessionState.INITIALISED&&(this.analyticPoller=new p.UrlPoller(this.getAnalyticsUrl(),this.getSessionProperties().getRequestTimeout(),(function(t,n){400===t.status?e.onSessionError(s.SessionErrorCode.TIMEOUT):t.ok&&(e.targetDuration=n,e.parseAnalyticPayload(t.body))})))},S.isMetadataInSequence=function(e,t){return this.pendingTimedMetadata?(u.YoLog.d(u.DebugFlags.DEBUG_STATE_MACHINE,"Pending metadata"),!1):t.isInSequence(e)},S.onAdvertBreakEnd=function(){if(this.inAdBreak){var e=this.getCurrentAdBreak();if(e){var t=e.getTrackingReport("breakEnd",!0);this.getReportsManager().fireBeacon(t,new l.ReportingParams(this.getPlayhead()))}this.inAdBreak=!1,u.YoLog.trace("adbreakEnd"),this.getReportsManager().raiseAdBreakCallback("end",null,this),this.trackingErrors.length>0&&this.getReportsManager().raiseSessionErrorCallback(s.SessionErrorCode.TRACKING_ERROR,this),this.linearAdBreaks.length>0&&(this.linearAdBreaks.splice(0,1),u.YoLog.d(u.DebugFlags.DEBUG_LIFECYCLE,"Removed AdBreak. Remaining: "+this.linearAdBreaks.length)),this.pendingTimedMetadata=null,this.historicalTimedMetadata=[],this.setCurrentAdvert(null),this.setCurrentAdBreak(null)}},S.onAdvertBreakStart=function(e){var t=this.getAdBreakForAdvert(e);if(this.inAdBreak){if(null!=t){var n=t.getTrackingReport("breakStart",!this.reportsManager.reportsSuppressed());this.getReportsManager().fireBeacon(n,new l.ReportingParams(this.getPlayhead()))}}else if(this.inAdBreak=!0,this.clearTrackingErrors(),this.setCurrentAdBreak(t),u.YoLog.d(u.DebugFlags.DEBUG_LIFECYCLE,"AdBreak count: "+this.linearAdBreaks.length),u.YoLog.trace("adbreakStart"),this.getReportsManager().raiseAdBreakCallback("start",t,this),t){var r=t.getTrackingReport("breakStart",!this.reportsManager.reportsSuppressed());this.getReportsManager().fireBeacon(r,new l.ReportingParams(this.getPlayhead()))}},S.onAdvertEnd=function(e){this.getCurrentAdvert()&&(e!==b.NEW_ADVERT_STARTING?this.cancelScheduleWatchdog():u.YoLog.d(u.DebugFlags.DEBUG_STATE_MACHINE,"onAdvertEnd(): new ad starting, not firing adbreak watchdog timer"),e===b.PLAYED_OUT?this.signalTimelineTrackingEvents(this.getCurrentAdvert().getDuration()):this.getCurrentAdvert().clearTrackingSchedule(),this.getCurrentAdvert().setInactive(),u.YoLog.trace("advertEnd"),this.getReportsManager().raiseAdvertCallback("end",null,this),this.setCurrentAdvert(null),this.getCurrentAdBreak().isActive()?e!==b.NEW_ADVERT_STARTING&&this.scheduleAdvertBreakEnd(this.interSegmentTimeout):this.onAdvertBreakEnd())},S.onAdvertStart=function(t,n){t.setStart(n),this.onAdvertEnd(b.NEW_ADVERT_STARTING),this.onAdvertBreakStart(t),this.setCurrentAdBreak(this.getAdBreakForAdvert(t)),this.getCurrentAdBreak()?(this.setCurrentAdvert(t),e.prototype.onAdvertStart.call(this,t),this.reportsManager.reportsSuppressed()&&this.getCurrentAdvert().clearTrackingSchedule(),u.YoLog.trace("advertStart"),this.getReportsManager().raiseAdvertCallback("start",t,this),this.fireImpressionReport(),this.signalTimelineTrackingEvents(r.Constant.ADVERT_START_TIMESLOT)):u.YoLog.e("*** AdBreak is null ***")},S.parseAnalyticPayload=function(e){var t=this;return this.clearParsingErrors(),g.Parser.parse(e,this).then((function(e){if(t.parsingErrors.length>0&&t.getReportsManager().raiseSessionErrorCallback(s.SessionErrorCode.PARSING_ERROR,t),!e)return null;if(t.getLastAnalyticUpdate()&&e.isEqualTo(t.getLastAnalyticUpdate()))return u.YoLog.d(u.DebugFlags.DEBUG_PARSING,"Content unchanged. Analytic update not delivered"),e;var n=e.getEarlyReturn();if(n&&-1!==n&&t.adjustForEarlyReturn(n),t.setLastAnalyticUpdate(e),!e.hasAdBreaks())return u.YoLog.d(u.DebugFlags.DEBUG_PARSING,"No ad breaks in payload"),t.playing||(u.YoLog.trace("sdk analytics 0 0 0"),t.reportsManager.raiseAnalyticUpdateCallback(t)),e;u.YoLog.trace("sdk analytics: "+e.getLinearAdBreaks().length+" "+e.getNonLinearAdBreaks().length+" "+e.getDisplayAdBreaks().length);for(var r,i=!1,o=v(e.getLinearAdBreaks());!(r=o()).done;){var a=r.value;if(0===a.getAdverts().length){var c=new l.ReportingParams(t.getPlayhead());t.getReportsManager().fireBeacon(a.getTrackingReport("breakStart",!0),c),t.getReportsManager().fireBeacon(a.getTrackingReport("breakEnd",!0),c)}else t.linearAdBreaks.push(a),i=!0}for(var d,_=v(e.getNonLinearAdBreaks());!(d=_()).done;){var f=d.value;t.nonLinearAdBreaks.push(f),i=!0}for(var h,p=v(e.getDisplayAdBreaks());!(h=p()).done;){var g=h.value;t.displayAdBreaks.push(g),i=!0}if(i&&!t.pendingTimedMetadata&&t.getReportsManager().raiseAnalyticUpdateCallback(t),t.pendingTimedMetadata){u.YoLog.d(u.DebugFlags.DEBUG_STATE_MACHINE,"Process pending metadata: "+t.pendingTimedMetadata);var m=t.pendingTimedMetadata;t.pendingTimedMetadata=null,t.onTimedMetadata(m)}return t.processHistoricalData(),e})).catch((function(e){u.YoLog.d(u.DebugFlags.DEBUG_POLLING,"Analytic Poll completed with unreadable data: "+e),t.parsingErrors.length>0&&t.getReportsManager().raiseSessionErrorCallback(s.SessionErrorCode.PARSING_ERROR,t)}))},S.onPlaybackContinue=function(){this.isPlaybackBuffering()&&(this.getCurrentAdvert()?this.scheduleAdvertEnd():this.getCurrentAdBreak()&&this.scheduleAdvertBreakEnd(this.interSegmentTimeout)),e.prototype.onPlaybackContinue.call(this)},S.onPlaybackPause=function(){e.prototype.onPlaybackPause.call(this),this.cancelScheduleWatchdog()},S.onPlaybackReady=function(){e.prototype.onPlaybackReady.call(this),this.getSessionState()===s.SessionState.INITIALISED&&!0!==this.playing&&this.analyticPoller&&this.analyticPoller.request()},S.onPlaybackResume=function(){this.isNotPlaying()&&!this.isPlaybackBuffering()&&(this.getCurrentAdvert()?this.scheduleAdvertEnd(null):this.getCurrentAdBreak()&&this.scheduleAdvertBreakEnd(this.interSegmentTimeout)),e.prototype.onPlaybackResume.call(this)},S.onPlaybackStall=function(){e.prototype.onPlaybackStall.call(this),this.cancelScheduleWatchdog()},S.onPlaybackStart=function(t){this.isNotPlaying()?this.getSessionState()!==s.SessionState.INITIALISED?u.YoLog.w("Reporting START when session has not been initialised"):(e.prototype.onPlaybackStart.call(this,t),this.analyticPoller.start()):u.YoLog.w("Reporting START when start has already been reported")},S.onTimedMetadata=function(e){if(u.YoLog.trace("timedmetadata "+e.getTypeWithinSegment().key+e.getSegmentNumber()+":"+e.getSegmentCount()+" "+e.getPlayhead()),u.YoLog.d(u.DebugFlags.DEBUG_STATE_MACHINE,"Received metadata: "+e+", timestamp: "+e.getTimestamp()),this.isPlaybackBuffering())u.YoLog.w("Playback buffering - should not be receiving timed metadata");else if(this.isNotPlaying())u.YoLog.w("Playback not playing - should not be receiving timed metadata");else if(this.scheduleAdvertEnd(e),e.isDuplicate(this.lastTimedMetadata)||e.isDuplicate(this.pendingTimedMetadata))u.YoLog.d(u.DebugFlags.DEBUG_STATE_MACHINE,"Duplicate metadata: "+e);else{var t=e.getMediaId(),n=this.getFirstAdvertRemovingAllPrevious(t);if(!n)return e.isFirstInSequence()?(u.YoLog.d(u.DebugFlags.DEBUG_STATE_MACHINE,"FIRST pending metadata for advert "+t),this.pendingTimedMetadata=e,this.lastTimedMetadata=null,this.analyticPoller&&this.analyticPoller.request()):e.isLastInSequence()&&this.getSessionProperties().getFireHistoricalBeacons()&&this.pendingTimedMetadata&&(u.YoLog.d(u.DebugFlags.DEBUG_STATE_MACHINE,"LAST pending metadata for advert: "+t+" . Moving to historical list"),this.historicalTimedMetadata.push(this.pendingTimedMetadata),this.pendingTimedMetadata=null),void this.onAdvertBreakStart(null);if(this.isMetadataInSequence(this.lastTimedMetadata,e))return this.lastTimedMetadata=e,void this.handleMetaDataInSequence(n,e);u.YoLog.d(u.DebugFlags.DEBUG_STATE_MACHINE,"Metadata out of sequence"),this.pendingTimedMetadata=null,this.lastTimedMetadata=e,this.handleMetaDataOutOfSequence(n,e)}},S.parseManifestResponse=function(e,t){var n=e,r=null;d.HlsManifestParser.isHlsManifest(n)?(u.YoLog.d(u.DebugFlags.DEBUG_PARSING,"Processing HLS master playlist: "+t),r=d.HlsManifestParser.parse(n)):(u.YoLog.d(u.DebugFlags.DEBUG_PARSING,"Processing DASH manifest: "+t),r=i.DashManifestParser.parse(n)),r?(0,c.isNullOrEmpty)(r.getAnalyticUrl())?(this.setPlaybackUrl(t),u.YoLog.w("Analytics URL not found in manifest payload"),this.completeWithStatus(s.SessionState.NO_ANALYTICS,0)):(0,h.getUrl)(r.getAnalyticUrl())?(0,c.isNullOrEmpty)(r.getPlaybackUrl())?(this.setPlaybackUrl(t),u.YoLog.w("Playback URL not found in manifest payload"),this.completeWithStatus(s.SessionState.NO_ANALYTICS,s.MALFORMED_URL)):(this.setPlaylistProperties(r),this.interSegmentTimeout=r.getIntersegmentTimeout(),this.completeWithStatus(s.SessionState.INITIALISED,0),u.YoLog.d(u.DebugFlags.DEBUG_LIFECYCLE,"Successful. URL: "+this.getPlaybackUrl())):(this.setPlaybackUrl(t),u.YoLog.w("Malformed analytics URL in manifest payload"),this.completeWithStatus(s.SessionState.NO_ANALYTICS,s.MALFORMED_URL)):(this.setPlaybackUrl(t),u.YoLog.w("Playlist/manifest processing unsuccesful"),this.completeWithStatus(s.SessionState.NO_ANALYTICS,s.UNKNOWN_FORMAT))},S.processHistoricalData=function(){var e=this.getCurrentAdBreak();if(e)for(var t,n=v(this.historicalTimedMetadata);!(t=n()).done;){var r=t.value.getMediaId(),i=e.getAdvertFromIdentifier(r);if(i){u.YoLog.d(u.DebugFlags.DEBUG_REPORTS,"Firing beacon for historical advert: "+r);for(var o,a=new l.ReportingParams(this.getPlayhead(),i.getStart(),i.getLinearCreative().getAssetUri(),i.getMacroSubstitutions()),s=[],c=v(i.getTrackingSchedule());!(o=c()).done;){var d=o.value,_=d[0],f=d[1];s.push(_);var h=i.getTrackingReportLinear(f);h&&(u.YoLog.d(u.DebugFlags.DEBUG_REPORTS,"Firing beacon(s) for event: "+_),this.getReportsManager().fireBeacon(h,a))}this.removeKeysFromTrackingSchedule(s)}}this.historicalTimedMetadata=[]},S.scheduleAdvertBreakEnd=function(e){this.cancelScheduleWatchdog(),this.advertEndWatchdog=setTimeout(this.metadataWatchdogEndBreak.bind(this),e),u.YoLog.d(u.DebugFlags.DEBUG_STATE_MACHINE,"Scheduled adbreak end watchdog timer: "+e+"ms")},S.scheduleAdvertEnd=function(e){this.cancelScheduleWatchdog();var t=this.getMetadataTimeout(e);this.advertEndWatchdog=setTimeout(this.metadataWatchdog.bind(this),t),u.YoLog.d(u.DebugFlags.DEBUG_STATE_MACHINE,"Scheduled advert end watchdog timer: "+t+"ms")},S.setTargetDuration=function(e){this.targetDuration=e},S.shutdown=function(){e.prototype.shutdown.call(this),this.cancelScheduleWatchdog(),this.analyticPoller&&(this.analyticPoller.shutdown(),this.analyticPoller=null,u.YoLog.d(u.DebugFlags.DEBUG_LIFECYCLE,"Analytic poller cancelled"))},S.setPlaylistProperties=function(e){this.setIdentifier(e.getSessionIdentifier()),this.setAnalyticsUrl(e.getAnalyticUrl()),this.setPlaybackUrl(e.getPlaybackUrl())},S.metadataWatchdog=function(){u.YoLog.w("Watchdog timer expired before metadata was received"),this.pendingTimedMetadata?this.onAdvertBreakEnd():this.onAdvertEnd(b.NOT_PLAYED_OUT)},S.metadataWatchdogEndBreak=function(){u.YoLog.w("Watchdog timer expired before metadata was received"),this.onAdvertBreakEnd()},m}(s.Session);t.SessionLive=S},6748:(e,t,n)=>{"use strict";t.__esModule=!0,t.SessionVOD=void 0;var r=n(7461),i=n(7823),o=n(6822),a=n(6028),s=n(597),u=n(5719),c=n(9513),l=n(5406),d=n(4409),_=n(353);function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.linearAdBreaks);!(t=n()).done;){var r=t.value;if(r.getStart()<=e&&e0&&n.getReportsManager().raiseSessionErrorCallback(o.SessionErrorCode.PARSING_ERROR,n),e?(n.mergePlaceholderBreaks(e)?n.reportsManager&&n.reportsManager.raiseAnalyticUpdateCallback(n):(i.YoLog.e("Fulfilment payload could not be merged"),n.onSessionError(o.SessionErrorCode.UNRESOLVED_BREAK)),i.YoLog.d(i.DebugFlags.DEBUG_PARSING,e.toString())):(i.YoLog.e("Fulfilment payload could not be parsed"),n.onSessionError(o.SessionErrorCode.UNRESOLVED_BREAK))}));i.YoLog.e("Fulfilment payload request failed: "+e.statusText),n.onSessionError(o.SessionErrorCode.UNRESOLVED_BREAK)})):(i.YoLog.e("Fulfilment payload followup URL is not valid: "+s),void this.onSessionError(o.SessionErrorCode.UNRESOLVED_BREAK))},g.onPlayerEvent=function(t,n){t!==u.PlayerEvent.SEEK&&t!==u.PlayerEvent.ADVERT_SKIP&&t!==u.PlayerEvent.ADVERT_REWIND||(this.didSeek=!0),e.prototype.onPlayerEvent.call(this,t,n)},g.onPlayheadUpdate=function(t){this.handleHeartbeat(t),e.prototype.onPlayheadUpdate.call(this,t)},g.setAdBreaksInactivePriorTo=function(t){e.prototype.setAdBreaksInactivePriorTo.call(this,t)},g.setDuration=function(e){this.duration=e},d}(d.SessionSeekable);t.SessionVOD=g},4672:(e,t,n)=>{"use strict";t.__esModule=!0,t.TypeWithinSegment=t.TimedMetadata=void 0;var r=n(7823),i=function(){function e(t,n,r,i,o,a){this.mediaId=e.decodeString(t),this.offset=o,this.segmentCount=r,this.segmentNumber=n,this.playhead=a,this.timestamp=Date.now(),this.typeWithinSegment=i}e.createFromMetadata=function(t,n,i,a,s){if(!t)return r.YoLog.e("Failed to interpret ymid"),null;i=e.decodeString(i);var u=o.getForKey(i);if(null==u)return r.YoLog.e("Failed to interpret ytyp"),null;var c=e.decodeString(n).split(":");if(2!==c.length)return r.YoLog.e("Failed to interpret yseq"),null;var l=parseInt(c[0]),d=parseInt(c[1]);if(isNaN(l)||0===l||isNaN(d)||0===d)return r.YoLog.e("Failed to interpret yseq"),null;var _=parseFloat(this.decodeString(a)),f=Number.isNaN(_)?0:Math.round(1e3*_);return s<0?(r.YoLog.w("Invalid playhead provided:"+s),null):new e(t,l,d,u,f,s)},e.decodeString=function(e){return e&&e.length>0&&3===e[0]?e.substring(1):e};var t=e.prototype;return t.getMediaId=function(){return this.mediaId},t.getOffset=function(){return this.offset},t.getPlayhead=function(){return this.playhead},t.getSegmentCount=function(){return this.segmentCount},t.getSegmentNumber=function(){return this.segmentNumber},t.getTimestamp=function(){return this.timestamp},t.getTypeWithinSegment=function(){return this.typeWithinSegment},t.isDuplicate=function(e){return!!e&&this.mediaId===e.mediaId&&this.segmentNumber===e.segmentNumber&&this.segmentCount===e.segmentCount&&this.typeWithinSegment===e.typeWithinSegment&&this.offset===e.offset},t.isFirstInSequence=function(){return this.isFirstInSegment()&&1===this.segmentNumber},t.isFirstInSegment=function(){return this.typeWithinSegment===o.START},t.isInSequence=function(e){if(!e)return!0;if(this.mediaId!==e.mediaId)return this.isFirstInSequence();var t=this.segmentNumber-e.segmentNumber;return 0===t?this.typeWithinSegment.isInSequence(e.typeWithinSegment)||this.typeWithinSegment.isEqualMidType(e.typeWithinSegment)&&this.offset>e.offset:t>0},t.isLastInSegment=function(){return this.typeWithinSegment===o.END},t.isLastInSequence=function(){return this.isLastInSegment()&&this.isLastSegment()},t.isLastSegment=function(){return this.segmentNumber===this.segmentCount},t.toString=function(){return"Metadata [ @"+this.playhead+" / "+this.mediaId+" / "+this.segmentNumber+":"+this.segmentCount+" / "+this.typeWithinSegment.key+" : "+this.offset+" ]"},e}();t.TimedMetadata=i;var o=function(){function e(e,t){this.key=e,this.order=t}e.getForKey=function(t){if(!e.initialised){var n=e.END,r=e.MID,i=e.START;e.KEY_MAP.set(n.key,n),e.KEY_MAP.set(r.key,r),e.KEY_MAP.set(i.key,i),e.initialised=!0}return e.KEY_MAP.get(t)};var t=e.prototype;return t.isEqualMidType=function(e){return!!e&&1===this.order&&1===e.order},t.isInSequence=function(e){return!e||this.order>e.order},e}();t.TypeWithinSegment=o,o.END=new o("E",2),o.MID=new o("M",1),o.START=new o("S",0),o.KEY_MAP=new Map,o.initialised=!1},1126:(e,t,n)=>{"use strict";t.__esModule=!0,t.TrackingError=void 0;var r=n(3755);function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}var o=function(e){var t,n;function o(t,n,i){var o;return(o=e.call(this,(0,r.millisToTimestamp)(Date.now()))||this).url=t,o.errorCode=n,o.event=i,o}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n);var a=o.prototype;return a.getUrl=function(){return this.url},a.getErrorCode=function(){return this.errorCode},a.getEvent=function(){return this.event},o}(n(4281).SessionError);t.TrackingError=o},6670:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}t.__esModule=!0,t.VerificationEventHandler=void 0;var i=function(e){var t,n;function i(){return e.apply(this,arguments)||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n),i.prototype.onVerificationEvent=function(e,t){throw new Error("Function must be overridden")},i}(n(3730).XmlValidation);t.VerificationEventHandler=i},868:(e,t,n)=>{"use strict";t.__esModule=!0,t.raiseCallback=function(e,t){e&&(t=t.bind(e));var n=null;try{for(var i=arguments.length,o=new Array(i>2?i-2:0),a=2;a0?r.YoLog.e("Exception thrown from callback function "+u[1]+": "+e):r.YoLog.e("Exception thrown from callback function.")}return n};var r=n(7823)},936:(e,t,n)=>{"use strict";t.__esModule=!0,t.copyMap=function(e){for(var t,n=new Map,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e);!(t=r()).done;){var o=t.value,a=o[0],s=o[1];n.set(a,s)}return n},t.getKeyFromValue=function(e,t){if(!t)return r.YoLog.e("getKeyFromValue: obj is null"),null;for(var n=0,i=Object.entries(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";t.__esModule=!0,t.VISIBLE_EVENTS=t.VERIFICATION_EVENTS=t.TIMELINE_EVENTS=t.Payload=t.PLAYER_OPERATION_EVENTS=t.NON_LINEAR_EVENTS=t.LINEAR_EVENTS=t.INTERACTIVE_EVENTS=t.Constant=t.COMPANION_EVENTS=t.CAT_TIMELINE_EVENTS=t.CAT_AD_BREAK_EVENTS=t.AD_BREAK_EVENTS=void 0,t.getLogTag=function(){return"YoAdManagement: "};var n={}.HTTP_AGENT?{}.HTTP_AGENT:"Yospace SDK/3.0";t.PLAYER_OPERATION_EVENTS=["mute","unmute","pause","resume","rewind","playerExpand","playerCollapse","closeLinear","skip"],t.COMPANION_EVENTS=["creativeView"],t.INTERACTIVE_EVENTS=["interactiveStart"],t.LINEAR_EVENTS=["loaded","start","firstQuartile","midpoint","thirdQuartile","complete","progress","mute","unmute","pause","resume","rewind","playerExpand","playerCollapse","closeLinear","skip","otherAdInteraction"],t.NON_LINEAR_EVENTS=["creativeView","mute","unmute","pause","resume","rewind","skip","playerExpand","playerCollapse","adExpand","adCollapse","minimize","overlayViewDuration","acceptInvitation","close","otherAdInteraction"],t.VISIBLE_EVENTS=["creativeView","close","interactiveStart"],t.VERIFICATION_EVENTS=["verificationNotExecuted"],t.TIMELINE_EVENTS=["loaded","start","firstQuartile","midpoint","thirdQuartile","complete","progress"],t.AD_BREAK_EVENTS=["breakStart","breakEnd"];var r=Object.freeze({ADVERT_START_TIMESLOT:5,DEFAULT_POLLING_DELAY:11e3,EVENT_CUEPOINT_TOL:10,EXPECTED_POLL_COMPLETE_TIME:250,INTERSEGMENT_TIMEOUT:2700,REQUEST_TIMEOUT:5e3,MAX_CADENCE:250,MIN_INTRASEGMENT_TIMEOUT:2500,MIN_SEGMENT_LENGTH:2e3,USER_AGENT:n});t.Constant=r,t.CAT_AD_BREAK_EVENTS=1,t.CAT_TIMELINE_EVENTS=2;var i=Object.freeze({IDENTIFIER:"SESSIONIDENTIFIER",LOCATION:"LOCATION",HOSTNODE:"HOST",PORT:"PORT",ANALYTICURL:"ANALYTICURL",PAUSEURL:"PAUSEURL",SCHEME:"SCHEME",QS:"QUERYSTRING",AVAILABILITYSTART:"AVAILABILITYSTARTTIME"});t.Payload=i},3755:(e,t)=>{"use strict";t.__esModule=!0,t.millisToTimeString=function(e){var t=Math.floor(e/1e3%60),n=Math.floor(e/6e4%60),r=Math.floor(e/36e5%24);return""+(r<10?0:"")+r+":"+(n<10?0:"")+n+":"+(t<10?0:"")+t+"."+((e=Math.round(e%1e3))<10?"00":e<100?"0":"")+e},t.millisToTimestamp=function(e){return new Date(e).toISOString()},t.pdtToMillis=function(e,t){if(!e||0===e.length||-1===e.indexOf("T"))return t;var n=e.substring(e.indexOf("T"),e.length-1);-1===n.indexOf("+")&&-1===n.indexOf("-")&&Number.isInteger(Number.parseInt(e.charAt(e.length-1)))&&(e+="Z");var r=Date.parse(e);return Number.isNaN(r)?t:r},t.stringToIntegerNumber=function(e,t){var n=Number.parseInt(e);return Number.isInteger(n)?n:t},t.timeStringToMillis=function(e,t){var n=void 0!==t?t:-1;if(!("string"==typeof e&&e.length>0))return n;var r=e.split(":");if(3!==r.length)return n;var i=parseInt(r[0]),o=parseInt(r[1]);if(Number.isNaN(i)||Number.isNaN(o))return n;var a=0,s=0,u=r[2].split(".");return 2!==u.length?a=parseInt(r[2]):(a=parseInt(u[0]),s=parseInt(u[1])),Number.isNaN(a)||Number.isNaN(s)||i>23||o>59||a>59?n:36e5*i+6e4*o+1e3*a+s}},6044:(e,t,n)=>{"use strict";t.__esModule=!0,t.getClickTrackingReport=function(e,t){return e.length>0?new i.TrackingReport(t,e):null},t.isValidSize=function(e){if(!e)return!1;for(var t,n=null,i=null,a=o(e);!(t=a()).done;){var s=t.value,u=s.getName(),c=s.getValue();"width"!==u||(0,r.isNullOrEmpty)(c)?"height"!==u||(0,r.isNullOrEmpty)(c)||(i=s):n=s}return!(!n||!i)},t.prefetch=function(e,t){for(var n,r=o(e);!(n=r()).done;)n.value[1].prefetch(t)};var r=n(597),i=n(1862);function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";t.__esModule=!0,t.HttpConnection=void 0;var r=n(5406),i=n(1289),o=n(7823),a=n(6822);function s(){s=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,i){var o=t&&t.prototype instanceof f?t:f,a=Object.create(o.prototype),s=new C(i||[]);return r(a,"_invoke",{value:E(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var _={};function f(){}function h(){}function p(){}var g={};c(g,o,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(P([])));m&&m!==t&&n.call(m,o)&&(g=m);var y=p.prototype=f.prototype=Object.create(g);function b(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function i(r,o,a,s){var u=d(e[r],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return i("throw",e,a,s)}))}s(u.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function E(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=$(a,n);if(s){if(s===_)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=d(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===_)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function $(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,$(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),_;var i=d(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,_;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,_):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,_)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function P(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),_}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:P(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),_}},e}function u(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function c(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";t.__esModule=!0,t.createHeaders=function(e){var t=new Headers;return t.append("User-Agent",e),t},t.fetchWithTimeout=function(e,t,n){var r=null,a=new Promise((function(e){r=setTimeout(e,n,{timeout:!0,error:"timeout",statusText:"Connection timeout",status:o.CONNECTION_TIMEOUT})}));return Promise.race([fetch(e,t),a]).then((function(t){return t.timeout?i.YoLog.d(i.DebugFlags.DEBUG_HTTP_REQUESTS,"Request for "+e+" timed out"):!t.ok&&t.status&&i.YoLog.d(i.DebugFlags.DEBUG_HTTP_REQUESTS,"Request for "+e+" failed. Status: "+t.status+". Message: "+t.statusText),t})).catch((function(t){i.YoLog.d(i.DebugFlags.DEBUG_HTTP_REQUESTS,"Request for "+e+" failed. Exception: "+t);var n=o.CONNECTION_ERROR;return("ERR_INVALID_URL"===t.code||t.cause&&"ERR_INVALID_URL"===t.cause.code)&&(n=o.MALFORMED_URL),{error:t,statusText:t.message,status:n}})).finally((function(){clearTimeout(r)}))},t.getAbsolute=function(e,t){var n=new URL(t);return new URL(n,e).toString()},t.getUrl=function(e){if((0,r.isNullOrEmpty)(e))return null;var t=null;try{t=new URL(e)}catch(e){return null}if(!t)return null;try{decodeURI(t.pathname)}catch(e){return null}return t};var r=n(597),i=n(7823),o=n(6822)},597:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(e,t,n){var r=e;if(0===t||">"===t){r+="\n";for(var i=0;i<4*n;++i)r+=" "}return r}t.__esModule=!0,t.equalsIgnoreCase=function(e,t){return null===e?null===t:void 0===e?void 0===t:!(!n(e)||!n(t))&&e.toUpperCase()===t.toUpperCase()},t.formatHtml=function(e){if(!e)return"";try{for(var t=0,n="",i=null,o=0,a=0;a{"use strict";t.__esModule=!0,t.YoLog=t.DebugFlags=t.DEBUG_VALIDATION=t.DEBUG_STATE_MACHINE=t.DEBUG_REPORTS=t.DEBUG_POLLING=t.DEBUG_PLAYBACK=t.DEBUG_PARSING=t.DEBUG_LIFECYCLE=t.DEBUG_HTTP_REQUESTS=t.DEBUG_ALL=void 0;var r=n(8686),i=n(1289),o=Object.freeze({DEBUG_PLAYBACK:1,DEBUG_LIFECYCLE:2,DEBUG_POLLING:4,DEBUG_REPORTS:8,DEBUG_STATE_MACHINE:16,DEBUG_HTTP_REQUESTS:32,DEBUG_PARSING:64,DEBUG_VALIDATION:128,DEBUG_ALL:Number.MAX_SAFE_INTEGER});t.DebugFlags=o;var a=o.DEBUG_PLAYBACK;t.DEBUG_PLAYBACK=a;var s=o.DEBUG_LIFECYCLE;t.DEBUG_LIFECYCLE=s;var u=o.DEBUG_POLLING;t.DEBUG_POLLING=u;var c=o.DEBUG_REPORTS;t.DEBUG_REPORTS=c;var l=o.DEBUG_STATE_MACHINE;t.DEBUG_STATE_MACHINE=l;var d=o.DEBUG_HTTP_REQUESTS;t.DEBUG_HTTP_REQUESTS=d;var _=o.DEBUG_PARSING;t.DEBUG_PARSING=_;var f=o.DEBUG_VALIDATION;t.DEBUG_VALIDATION=f;var h=o.DEBUG_ALL;t.DEBUG_ALL=h;var p=function(){function e(){}return e.setLogger=function(t){e.logger=t},e.setDebugFlags=function(t){e.debugflags=t},e.getDebugFlags=function(){return e.debugflags},e.d=function(t,n){e.debugflags&t&&e.logger.debug((0,i.getLogTag)()+n)},e.e=function(t){e.logger.error((0,i.getLogTag)()+t)},e.i=function(t,n){e.debugflags&t&&e.logger.info((0,i.getLogTag)()+n)},e.w=function(t){e.logger.warn((0,i.getLogTag)()+t)},e.trace=function(t){e.d(o.DEBUG_VALIDATION,"["+Date.now()+"][YoSDK:"+t+"]")},e}();t.YoLog=p,p.debugflags=0,p.logger=r.Logger},2612:(e,t,n)=>{"use strict";var r=n(7823);r.DEBUG_ALL,r.DEBUG_PLAYBACK,r.DEBUG_HTTP_REQUESTS,r.DEBUG_LIFECYCLE,r.DEBUG_PARSING,r.DEBUG_POLLING,r.DEBUG_REPORTS,r.DEBUG_STATE_MACHINE,r.DEBUG_VALIDATION,t.Mz=r.DebugFlags,t.kT=r.YoLog;var i=n(1235);i.AdBreak,t.CT=i.BreakType,n(7995).AdBreakEventHandler,n(8710).AdVerification,n(6366).Advert;var o=n(7196);o.AdvertEventHandler,o.ViewableEvent,n(982).AdvertWrapper;var a=n(4843);t.Vd=a.AnalyticEventObserver,n(7964).CompanionCreative,n(5250).Creative,n(4796).CreativeEventHandler,n(6265).IconClickFallbackImage,n(6464).IndustryIcon,n(1305).InteractiveCreative,n(6474).LinearCreative,n(6646).NonLinearCreative;var s=n(5719);s.PlaybackEventHandler,t.rg=s.PlayerEvent,s.ViewSize,n(6037).PlaybackPolicy;var u=n(1498);t.xR=u.PlaybackPolicyHandler;var c=n(6822);t.su=c.PlaybackMode,t.z_=c.Session,t.NV=c.SessionProperties,t.sM=c.SessionState,t.Pn=c.SessionErrorCode,t.Ct=c.CONNECTION_ERROR,t.zU=c.CONNECTION_TIMEOUT,t.lc=c.MALFORMED_URL,t.Qr=c.UNKNOWN_FORMAT,t.GX=c.NO_DVRLIVE,t.tQ=c.FALLBACK_URL,c.INVALID_WINDOW;var l=n(1289);l.CAT_AD_BREAK_EVENTS,l.CAT_TIMELINE_EVENTS;var d=n(3698);d.Resource,t._g=d.ResourceType;var _=n(6619);t.KW=_.SessionDVRLive,n(2326).SessionLive;var f=n(6748);t.ko=f.SessionVOD,n(4672).TimedMetadata,n(9473).VASTProperty,n(6670).VerificationEventHandler},2971:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}t.__esModule=!0,t.AnalyticBroker=void 0;var i=function(e){var t,n;function i(){return e.apply(this,arguments)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n);var o=i.prototype;return o.addParsingError=function(e){throw new Error("Function must be overridden")},o.clearParsingErrors=function(){throw new Error("Function must be overridden")},o.fireTrackingReport=function(e){throw new Error("Function must be overridden")},o.fireTrackingReportForCreative=function(e,t){throw new Error("Function must be overridden")},o.fireTrackingReportForIcon=function(e,t){throw new Error("Function must be overridden")},o.raiseTrackingCallbackForCreative=function(e,t){throw new Error("Function must be overridden")},o.getSessionProperties=function(){throw new Error("Function must be overridden")},o.normaliseAdBreakStart=function(e,t){throw new Error("Function must be overridden")},i}(n(5719).PlaybackEventHandler);t.AnalyticBroker=i},353:(e,t,n)=>{"use strict";t.__esModule=!0,t.DefaultPlaybackPolicyHandler=void 0;var r=n(1498),i=n(6822);function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}var a=function(e){var t,n;function r(t){var n;return(n=e.call(this)||this).playbackMode=t,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,o(t,n);var a=r.prototype;return a.canStop=function(e,t){switch(this.playbackMode){case i.PlaybackMode.LIVE:case i.PlaybackMode.DVRLIVE:case i.PlaybackMode.VOD:}return!0},a.canPause=function(e,t){switch(this.playbackMode){case i.PlaybackMode.LIVE:return!1;case i.PlaybackMode.DVRLIVE:case i.PlaybackMode.VOD:default:return!0}},a.canSkip=function(e,t,n){switch(this.playbackMode){case i.PlaybackMode.LIVE:return-1;case i.PlaybackMode.DVRLIVE:case i.PlaybackMode.VOD:default:return 0}},a.willSeekTo=function(e,t,n){switch(this.playbackMode){case i.PlaybackMode.LIVE:return n;case i.PlaybackMode.DVRLIVE:case i.PlaybackMode.VOD:default:return e}},a.canChangeVolume=function(e,t,n){switch(this.playbackMode){case i.PlaybackMode.LIVE:case i.PlaybackMode.DVRLIVE:case i.PlaybackMode.VOD:}return!0},a.canResize=function(e,t,n){switch(this.playbackMode){case i.PlaybackMode.LIVE:case i.PlaybackMode.DVRLIVE:case i.PlaybackMode.VOD:}return!0},a.canResizeCreative=function(e,t,n){switch(this.playbackMode){case i.PlaybackMode.LIVE:case i.PlaybackMode.DVRLIVE:case i.PlaybackMode.VOD:}return!0},a.canClickThrough=function(e,t,n){switch(this.playbackMode){case i.PlaybackMode.LIVE:case i.PlaybackMode.DVRLIVE:case i.PlaybackMode.VOD:}return!0},a.setPlaybackMode=function(e){this.playbackMode=e},a.didSkip=function(e,t,n){},a.didSeek=function(e,t,n){},r}(r.PlaybackPolicyHandler);t.DefaultPlaybackPolicyHandler=a},7461:(e,t)=>{"use strict";t.__esModule=!0,t.Event=void 0;var n=function(){function e(e,t){this.payload=e,this.source=t||null}var t=e.prototype;return t.getPayload=function(){return this.payload},t.getSource=function(){return this.source},e}();t.Event=n},4281:(e,t)=>{"use strict";t.__esModule=!0,t.SessionError=void 0;var n=function(){function e(e){this.utcTimestamp=e}var t=e.prototype;return t.toJsonString=function(){return JSON.stringify(this)},t.getUtcTimestamp=function(){return this.utcTimestamp},e}();t.SessionError=n},4409:(e,t,n)=>{"use strict";t.__esModule=!0,t.SessionSeekable=void 0;var r=n(2385),i=n(6822),o=n(1289),a=n(7823);function s(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&this.getReportsManager().raiseSessionErrorCallback(i.SessionErrorCode.TRACKING_ERROR,this),this.setCurrentAdBreak(null)},d.onAdvertEnd=function(){var e=this.getCurrentAdvert();e&&e.isActive()&&this.signalTimelineTrackingEvents(e.getStart()+e.getDuration()),e&&e.setInactive(),a.YoLog.trace("advertEnd"),this.getReportsManager().raiseAdvertCallback("end",null,this),this.setCurrentAdvert(null)},d.onAdvertStart=function(t){this.getCurrentAdvert()||(this.setCurrentAdvert(t),e.prototype.onAdvertStart.call(this,t),this.getReportsManager().reportsSuppressed()&&t.removeTrackingSchedule(),a.YoLog.trace("advertStart"),this.getReportsManager().raiseAdvertCallback("start",t,this),t&&t.isActive()&&(this.fireImpressionReport(),this.signalTimelineTrackingEvents(o.Constant.ADVERT_START_TIMESLOT)))},d.handlePostSeek=function(e){var t=this.getLastPlayed();a.YoLog.d(a.DebugFlags.DEBUG_STATE_MACHINE,"handlePostSeek: "+t+" -> "+e);var n=e-t;n>=0&&n<=l?a.YoLog.d(a.DebugFlags.DEBUG_STATE_MACHINE,"handlePostSeek: ignoring interval "+n+"ms"):this.getCurrentAdBreak()?this.handlePostSeekForAdBreak(t,e):this.handlePostSeekForContent(e)},d.handlePostSeekForContent=function(e){var t=this.adBreakForPlayhead(e);if(t){a.YoLog.d(a.DebugFlags.DEBUG_STATE_MACHINE,"handlePostSeek: CONTENT -> BREAK");var n=t.getAdvertFromPlayhead(e);n&&e-n.getStart()>l&&n.setInactive()}else a.YoLog.d(a.DebugFlags.DEBUG_STATE_MACHINE,"handlePostSeek: within content")},d.handlePostSeekForAdBreak=function(e,t){var n=this.adBreakForPlayhead(t);if(n)if(n!==this.getCurrentAdBreak()){a.YoLog.d(a.DebugFlags.DEBUG_STATE_MACHINE,"handlePostSeek: BREAK -> BREAK");var r=this.getCurrentAdBreak().getAdvertFromPlayhead(e);r&&r.setInactive();var i=n.getAdvertFromPlayhead(t);i&&t-i.getStart()>l&&i.setInactive()}else this.handlePostSeekForAdvertToAdvert(t);else{a.YoLog.d(a.DebugFlags.DEBUG_STATE_MACHINE,"handlePostSeek: BREAK -> CONTENT");var o=this.getCurrentAdBreak().getAdvertFromPlayhead(e);o&&o.setInactive()}},d.handlePostSeekForAdvertToAdvert=function(e){var t=this.getCurrentAdBreak().getAdvertFromPlayhead(e);t&&(this.getCurrentAdvert().setInactive(),t!==this.getCurrentAdvert()?(a.YoLog.d(a.DebugFlags.DEBUG_STATE_MACHINE,"handlePostSeek: ADVERT -> ADVERT"),e-t.getStart()>l&&t.setInactive()):a.YoLog.d(a.DebugFlags.DEBUG_STATE_MACHINE,"handlePostSeek: with advert"))},d.handleHeartbeat=function(e){a.YoLog.d(a.DebugFlags.DEBUG_STATE_MACHINE,"handleHeartbeat (playhead: "+e+")"),this.didSeek&&(this.handlePostSeek(e),this.didSeek=!1);var t=this.getLastPlayed();this.setPlayhead(e),this.getCurrentAdBreak()?this.handleHeartbeatForAdbreak(e):this.handleHeartbeatForContent(t,e)},d.handleHeartbeatForContent=function(e,t){var n=this.missedOpportunityBreak(e,t);if(n){var i=new r.ReportingParams(this.getPlayhead());this.getReportsManager().fireBeacon(n.getTrackingReport("breakStart",!0),i),this.getReportsManager().fireBeacon(n.getTrackingReport("breakEnd",!0),i),-1!==this.linearAdBreaks.indexOf(n)&&this.linearAdBreaks.splice(this.linearAdBreaks.indexOf(n),1)}var o=this.adBreakForPlayhead(t);if(o){a.YoLog.d(a.DebugFlags.DEBUG_STATE_MACHINE,"CONTENT -> BREAK (playhead: "+t+")"),this.onAdvertBreakStart(o);var s=o.getAdvertFromPlayhead(t);s&&this.onAdvertStart(s)}},d.handleHeartbeatForAdbreak=function(e){var t=this.adBreakForPlayhead(e);if(t)if(t!==this.getCurrentAdBreak()){a.YoLog.d(a.DebugFlags.DEBUG_STATE_MACHINE,"BREAK -> BREAK"),this.onAdvertEnd(),this.onAdvertBreakEnd(),this.onAdvertBreakStart(t);var n=t.getAdvertFromPlayhead(e);n&&this.onAdvertStart(n)}else this.handleHeartbeatForAdvertToAdvert(e);else a.YoLog.d(a.DebugFlags.DEBUG_STATE_MACHINE,"BREAK -> CONTENT"),this.onAdvertEnd(),this.onAdvertBreakEnd()},d.handleHeartbeatForAdvertToAdvert=function(e){var t=this.getCurrentAdBreak().getAdvertFromPlayhead(e);if(t)if(t!==this.getCurrentAdvert())a.YoLog.d(a.DebugFlags.DEBUG_STATE_MACHINE,"ADVERT -> ADVERT"),this.onAdvertEnd(),this.onAdvertStart(t);else{var n=Math.max(e-this.getCurrentAdvert().getStart(),0);this.signalTimelineTrackingEvents(n)}},d.adBreakForPlayhead=function(e){for(var t,n=s(this.linearAdBreaks);!(t=n()).done;){var r=t.value;if(r.getStart()<=e&&e=o)return i}}return null},d.onPlaybackStart=function(t){e.prototype.onPlaybackStart.call(this,t),this.handleHeartbeat(t)},d.setAdBreaksInactivePriorTo=function(e){for(var t,n=s(this.linearAdBreaks);!(t=n()).done&&t.value.setAdvertsInactivePriorTo(e););},u}(i.Session);t.SessionSeekable=d},191:(e,t,n)=>{"use strict";t.__esModule=!0,t.UrlPoller=void 0;var r=n(7823),i=n(1289),o=n(9513),a=n(6822);function s(){s=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,i){var o=t&&t.prototype instanceof f?t:f,a=Object.create(o.prototype),s=new C(i||[]);return r(a,"_invoke",{value:E(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var _={};function f(){}function h(){}function p(){}var g={};c(g,o,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(P([])));m&&m!==t&&n.call(m,o)&&(g=m);var y=p.prototype=f.prototype=Object.create(g);function b(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function i(r,o,a,s){var u=d(e[r],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return i("throw",e,a,s)}))}s(u.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function E(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=$(a,n);if(s){if(s===_)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=d(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===_)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function $(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,$(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),_;var i=d(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,_;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,_):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,_)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function P(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),_}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:P(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),_}},e}function u(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){u(o,r,i,a,s,"next",e)}function s(e){u(o,r,i,a,s,"throw",e)}a(void 0)}))}}var l=function(){function e(e,t,n,r){this.url=e,this.timeout=t,this.handler=n,this.frequency=r||i.Constant.DEFAULT_POLLING_DELAY,this.requestInProgress=!1,this.intervalID=null,this.lastPollTime=0,this.lastPollTimeMetric=0,this.queryParams=new Map,this.queryParams.set("ysdk",a.Session.version())}var t=e.prototype;return t.handleRequest=function(){var e=c(s().mark((function e(){var t,n,i;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={},e.next=3,o.HttpConnection.get(this.url,t,this.timeout,null,this.queryParams);case 3:return(n=e.sent).error&&r.YoLog.w("Poll failed: "+n.error),n.ok?(r.YoLog.trace("sdk poll"),(i=this.getRetryFromResponse(n))!==this.frequency&&(r.YoLog.d(r.DebugFlags.DEBUG_POLLING,"Poll interval changed to "+i+" millis"),this.frequency=i,this.isRunning()&&this._start(!1))):400===n.status||410===n.status?(this.stop(),410===n.status&&r.YoLog.d(r.DebugFlags.DEBUG_POLLING,"Stream is resolved. Stopping "+(this.handler?"analytic":"pause")+" poller")):r.YoLog.w("Unexpected poll response "+n.status+", intervalID: "+this.frequency+" ms"),e.abrupt("return",n);case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),t.getRetryFromResponse=function(e){var t=e.headers.get("Retry-After");return t=1e3*Number.parseFloat(t),!Number.isNaN(t)&&t>0?t:this.frequency},t.getFrequency=function(){return this.frequency},t.isRunning=function(){return null!==this.intervalID},t.request=function(){r.YoLog.d(r.DebugFlags.DEBUG_POLLING,"Request poll"),this._poll(!0)},t._poll=function(){var e=c(s().mark((function e(t){var n,r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.shouldPoll(t)){e.next=2;break}return e.abrupt("return");case 2:return this.requestInProgress=!0,n=Date.now(),0!==this.lastPollTime&&t||(this.lastPollTime=n),this.lastPollTimeMetric=n,e.next=8,this.handleRequest();case 8:r=e.sent,this.handler&&this.handler(r,this.frequency),this.requestInProgress=!1;case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.shouldPoll=function(e){if(this.requestInProgress)return r.YoLog.d(r.DebugFlags.DEBUG_POLLING,"Last poll still in flight. Ignoring."),!1;if(e)return!0;var t=Date.now()-this.lastPollTime;return!(t{"use strict";n.d(t,{U:()=>d});var r=n(2612),i=n(6140),o=n(3796);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}(e);try{for(o.s();!(t=o.n()).done;){var a=t.value;a.getProperty("adSlotId")?n.set(c(a),a):r.set(c(a),a)}}catch(e){o.e(e)}finally{o.f()}return r.forEach((function(e,t){var r,o=n.get(t);if(o){if(!o.resources.size){o.resources=e.resources,o.videoClicks=e.videoClicks;var a=o.trackingMap.get("creativeView").trackingUrls,c=e.trackingMap.get("creativeView").trackingUrls;a&&c&&a.push.apply(a,function(e){if(Array.isArray(e))return u(e)}(r=c)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||s(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}}else i.Y.warn("[Tub] - No matching first party companion for third party ".concat(t))})),Array.from(n,(function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),2!==o.length);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e)||s(e,2)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e);return t[0],t[1]}))}(r)}},{key:"makeYospaceIcons",value:function(t){var n=[];return t.length&&(n=t.map(e.makeTubAdIcon)),n}},{key:"makeTubAdIcon",value:function(e){var t={};e.getProperties().forEach((function(e){t[e.getName()]=e.getValue()}));var n=e.getResource(r._g.STATIC);return n&&(t.creativeType=n.getCreativeType(),t.resource=n.getStringData()),t.clickThrough=e.getClickThroughUrl(),t.viewTracking=e.getViewTrackingUrls(),t}},{key:"creatAdBreakUuid",value:function(e){return e.getIdentifier()?"".concat(e.getIdentifier(),"-").concat(e.getStart()):"".concat(e.getStart())}},{key:"mapAdBreak",value:function(t){return{id:e.creatAdBreakUuid(t),scheduleTime:t.getStart()/1e3,ads:t.getAdverts().map(e.mapLinearAd),duration:t.getDuration()/1e3,position:t.getPosition(),isActive:t.isActive.bind(t)}}},{key:"mapLinearAd",value:function(t){var n,s,u,c;if(!t)return null;var d=t.getLinearCreative();if(!d)return null;var _=e.makeYospaceCompanions(t),f=e.makeYospaceIcons(t.getIndustryIcons()),h=_.map((function(e){var t,n,i,o,s,u,c=e.getResource(r._g.STATIC)||e.getResource(r._g.HTML)||e.getResource(r._g.IFRAME)||e.getResource(r._g.UNKNOWN),l=(t={},a(t,r._g.HTML,"html"),a(t,r._g.STATIC,"static"),a(t,r._g.IFRAME,"iframe"),a(t,r._g.UNKNOWN,"unknown"),t)[c.getResourceType()];return{id:null===(n=e.getProperty("id"))||void 0===n?void 0:n.getValue(),adSlotId:null===(i=e.getProperty("adSlotId"))||void 0===i?void 0:i.getValue(),width:Number.parseFloat(null===(o=e.getProperty("width"))||void 0===o?void 0:o.getValue())||0,height:Number.parseFloat(null===(s=e.getProperty("height"))||void 0===s?void 0:s.getValue())||0,clickThroughUrl:e.getClickThroughUrl(),apiFramework:null===(u=e.getProperty("apiFramework"))||void 0===u?void 0:u.getValue(),type:l,data:null==c?void 0:c.getStringData()}}));return"brightline"===(null===(n=t.getProperty("AdSystem"))||void 0===n?void 0:n.getValue())&&(i.Y.debug("[Tub] Fixing lowercase BrightLine AdSystem string"),t.getProperty("AdSystem").setValue(o.q.BrightLine)),{isLinear:!t.isNonLinear(),duration:t.getDuration()/1e3,id:t.getIdentifier(),creativeId:d.getCreativeIdentifier(),adTitle:null===(s=t.getProperty("AdTitle"))||void 0===s?void 0:s.getValue(),advertiser:null===(u=t.getProperty("Advertiser"))||void 0===u?void 0:u.getValue(),lineage:t.getLineage(),clickThroughUrl:d.getClickThroughUrl(),mediaFileUrl:d.getAssetUri(),skippableAfter:d.getSkipOffset()/1e3,uiConfig:{requestsUi:l(t)},adSystem:null===(c=t.getProperty("AdSystem"))||void 0===c?void 0:c.getValue(),sequence:t.getSequence(),isFiller:t.isFiller(),clickThroughUrlOpened:function(){i.Y.log("[Tub] - calling LinearCreative.onClickThrough"),d.onClickThrough()},companions:h,icons:f}}},{key:"isTubAd",value:function(e){return void 0!==e.adSystem}},{key:"isBrightlineAd",value:function(e){return this.isTubAd(e)&&(e.adSystem===o.q.BrightLine||e.adSystem===o.q.BrightLineDirect)}}],n&&function(e,t){for(var n=0;n{"use strict";n.d(t,{K:()=>i});var r=n(6140),i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n;return t=e,n=[{key:"parseCompanionAd",value:function(e){var t=(new DOMParser).parseFromString(e,"text/html");return this.checkForParserError(t)?void r.Y.warn("Error parsing HTMLResource: "+e):t}},{key:"checkForParserError",value:function(e){return!(!e.body.innerHTML&&""!==e.body.innerHTML||e.getElementsByTagName("script").length>0)}}],n&&function(e,t){for(var n=0;n{"use strict";__nested_webpack_require_220537__.d(__nested_webpack_exports__,{A:()=>CompanionRenderer});var bitmovin_player_modules_bitmovinplayer_core__WEBPACK_IMPORTED_MODULE_0__=__nested_webpack_require_220537__(8617),bitmovin_player_modules_bitmovinplayer_core__WEBPACK_IMPORTED_MODULE_0___default=__nested_webpack_require_220537__.n(bitmovin_player_modules_bitmovinplayer_core__WEBPACK_IMPORTED_MODULE_0__),_yospace_admanagement_sdk__WEBPACK_IMPORTED_MODULE_1__=__nested_webpack_require_220537__(2612),fast_safe_stringify__WEBPACK_IMPORTED_MODULE_2__=__nested_webpack_require_220537__(4445),fast_safe_stringify__WEBPACK_IMPORTED_MODULE_2___default=__nested_webpack_require_220537__.n(fast_safe_stringify__WEBPACK_IMPORTED_MODULE_2__),_helpers_Logger__WEBPACK_IMPORTED_MODULE_4__=__nested_webpack_require_220537__(6140),_CompanionParser__WEBPACK_IMPORTED_MODULE_5__=__nested_webpack_require_220537__(1693),_AdTranslator__WEBPACK_IMPORTED_MODULE_3__=__nested_webpack_require_220537__(4999);function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n0;t--){var n=e.style[t];e.style.removeProperty(n)}if(this.savedStyle)for(var r=this.savedStyle.length;r>0;r--){var i=this.savedStyle[r];e.style.setProperty(i,this.savedStyle.getPropertyValue(i),this.savedStyle.getPropertyPriority(i))}}else _helpers_Logger__WEBPACK_IMPORTED_MODULE_4__.Y.debug("[clearContainer] container '".concat(e,"' does not exist, skipping"))}},{key:"renderCompanion",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=e.getResource(_yospace_admanagement_sdk__WEBPACK_IMPORTED_MODULE_1__._g.STATIC)||e.getResource(_yospace_admanagement_sdk__WEBPACK_IMPORTED_MODULE_1__._g.HTML)||e.getResource(_yospace_admanagement_sdk__WEBPACK_IMPORTED_MODULE_1__._g.IFRAME)||e.getResource(_yospace_admanagement_sdk__WEBPACK_IMPORTED_MODULE_1__._g.UNKNOWN);if(r&&!1!==e.isValid())if(t.container){var i=e.getProperty("id").value,o=e.getProperty("adSlotId").value;_helpers_Logger__WEBPACK_IMPORTED_MODULE_4__.Y.debug("[CompanionRenderer] rendering companion ad - "+i+" into "+o),_helpers_Logger__WEBPACK_IMPORTED_MODULE_4__.Y.debug("[CompanionRenderer] resource",fast_safe_stringify__WEBPACK_IMPORTED_MODULE_2___default()(r)),this.savedStyle=t.container.style;var a=r.getResourceType(),s=e.getClickThroughUrl();if(a===_yospace_admanagement_sdk__WEBPACK_IMPORTED_MODULE_1__._g.STATIC){var u=new Image(e.getProperty("width").value,e.getProperty("height").value);if(u.src=r.getStringData(),""!==s){var c=document.createElement("a");c.href=s,c.target="_blank",c.appendChild(u),t.container.appendChild(c)}else t.container.appendChild(u)}else if(a===_yospace_admanagement_sdk__WEBPACK_IMPORTED_MODULE_1__._g.HTML){var l=_CompanionParser__WEBPACK_IMPORTED_MODULE_5__.K.parseCompanionAd(r.getStringData());l&&(this.renderScriptsFromHtml(l),this.removeScriptsFromHtml(l),l.firstChild&&t.container.appendChild(l.firstChild))}else{if(a!==_yospace_admanagement_sdk__WEBPACK_IMPORTED_MODULE_1__._g.IFRAME)return;var d=new HTMLIFrameElement;d.src=r.getStringData(),d.width="100%",d.height="100%",t.container.appendChild(d)}n&&(e.setVisible(!0),e.getTrackingMap().forEach((function(e){if("creativeView"!==e.trackingEvent){_helpers_Logger__WEBPACK_IMPORTED_MODULE_4__.Y.debug("[Tub] firing companion tracking: ".concat(e.trackingEvent," for ").concat(e.trackingUrls.length," locations"));for(var t=0;t{"use strict";var r;n.d(t,{q:()=>r}),function(e){e.FreeWheel="FreeWheel",e.BrightLine="BrightLine",e.BrightLineDirect="BrightLine_Direct",e.YospaceInternal="YospaceInternal"}(r||(r={}))},6140:(e,t,n)=>{"use strict";n.d(t,{Y:()=>r});var r=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n;return t=e,n=[{key:"enable",value:function(){this.enabled=!0}},{key:"disable",value:function(){this.enabled=!1}},{key:"log",value:function(e){if(void 0!==console&&this.enabled){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i1?n-1:0),i=1;i1?n-1:0),i=1;i1?n-1:0),i=1;i2?r-2:0),o=2;o0&&!r[i].paused&&!r[i].ended&&r[i].readyState>2&&(this.video_target=r[i])}this.checkPlayerAttributes(),e.onPlayerSizeChange=setInterval(e.checkPlayerAttributes,250),e.adSessionID=this.getParameterByName("session_id",t);var o=document.createElement("iframe");o.id="bl_fif",o.class="bl_fif",o.name="bl_fif",o.setAttribute("scrolling","no"),o.setAttribute("frameborder","0"),o.setAttribute("allowfullscreen","true"),o.src="about:blank",o.style.width=this.player_attributes.width,o.style.height=this.player_attributes.height,o.style.zIndex="2147483647",o.style.position="absolute",o.style.top=this.player_attributes.top,o.style.right=this.player_attributes.right,o.style.bottom=this.player_attributes.bottom,o.style.left=this.player_attributes.left;var a=this.makeHttpObject();a.open("GET",t,!0),a.send(null),e._analytics.raiseEvent("OnAdRequested");var s=this;a.onloadend=function(){200==a.status?document.getElementById("bl_fif")||(document.body.appendChild(o),doc=o.contentWindow.document,doc.open(),doc.write(a.responseText),doc.close()):(s.handleError(a.status,t),e._analytics.raiseEvent("OnAdUnavailable"))}},handleError:function(t,n){e._logger("code: "+t+" on asset: "+n)},BL_resetDisplay:function(){document.getElementById("bl_fif")&&(fif=document.getElementById("bl_fif"),fif.style.width=e.player_attributes.width,fif.style.height=e.player_attributes.height,fif.style.position="absolute",fif.style.top=e.player_attributes.top,fif.style.left=e.player_attributes.left)},checkPlayerAttributes:function(){if(e.video_target){var t,n,r,i,o=document.getElementsByTagName("body")[0],a=o.getBoundingClientRect(),s=window.getComputedStyle(o),u=s.getPropertyValue("margin"),c=s.getPropertyValue("padding"),l=function(e){var t,n;return t=(e=(e=e.replaceAll("px","")).split(" "))[0],n=e.length>3?e[3]:e.length>1?e[1]:e[0],{top_value:t=Number(t),left_value:n=Number(n)}};null==u&&null==u||(margin_values=l(u),t=margin_values.top_value,n=margin_values.left_value),null==c&&null==c||(padding_values=l(c),r=padding_values.top_value,i=padding_values.left_value);var d=t+r,_=n+i;video_target_width=e.video_target.clientWidth,video_target_height=e.video_target.clientHeight,video_rect=e.video_target.getBoundingClientRect();var f=window.getComputedStyle(e.video_target);e.player_attributes.position=f.getPropertyValue("position"),e.player_attributes.width=video_target_width+"px",e.player_attributes.height=video_target_height+"px",e.player_attributes.top=video_rect.top+d-a.top+"px",e.player_attributes.left=video_rect.left+_-a.left+"px",document.getElementById("bl_fif")&&(fif_resize=document.getElementById("bl_fif"),fif_resize_rect=fif_resize.getBoundingClientRect(),fif_resize.offsetWidth==video_target_width&&fif_resize_rect.top==e.video_target.offsetTop&&fif_resize_rect.left==e.video_target.offsetLeft||e.BL_resetDisplay())}},guid:function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()},getParameterByName:function(e,t){t||(t=window.location.href),e=e.replace(/[\[\]]/g,"\\$&");var n=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null},makeHttpObject:function(){try{return new XMLHttpRequest}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}throw new Error("Could not create HTTP request object.")},setupWebkitAnalytics:function(t){window.BL._analytics=function(n){"use strict";function r(e,t){for(var n=0;nr)throw Error("Value for "+e+" is outside the range ["+n+","+r+"]")}function h(e,t){return e&&(e[t]||(e[t]={}))}function p(e,n,r){(r=void 0===r?void 0===t?null:t:r)&&((e=e.split(".")).slice(0,e.length-1).reduce(h,r)[e[e.length-1]]=n)}c.assertTruthyString=l,c.assertNotNullObject=d,c.assertNumber=_,c.assertNumberBetween=f,c.assertFunction=function(e,t){if(!t)throw Error(e+" must not be truthy.")},c.assertPositiveNumber=function(e,t){if(_(e,t),0>t)throw Error(e+" must be a positive number.")},p("OmidSessionClient.Partner",(function(e,t){l("Partner.name",e),l("Partner.version",t),this.name=e,this.version=t}));var g=function(e,t,n,r){r=void 0===r?a.AccessMode.FULL:r,l("VerificationScriptResource.resourceUrl",e),this.resourceUrl=e,this.vendorKey=t,this.verificationParameters=n,this.accessMode=r};g.prototype.toJSON=function(){return{accessMode:this.accessMode,resourceUrl:this.resourceUrl,vendorKey:this.vendorKey,verificationParameters:this.verificationParameters}},p("OmidSessionClient.VerificationScriptResource",g);var v=function(e,t,n,r){n=void 0===n?null:n,r=void 0===r?null:r,d("Context.partner",e),this.partner=e,this.verificationScriptResources=t,this.videoElement=this.slotElement=null,this.contentUrl=n,this.customReferenceData=r,this.underEvaluation=!1,this.serviceWindow=null};v.prototype.setVideoElement=function(e){d("Context.videoElement",e),this.videoElement=e},v.prototype.setSlotElement=function(e){d("Context.slotElement",e),this.slotElement=e},v.prototype.setServiceWindow=function(e){d("Context.serviceWindow",e),this.serviceWindow=e},p("OmidSessionClient.Context",v);var m={};m.omidGlobal=function(){if(void 0!==e&&e)return e;if(void 0!==n.g&&n.g)return n.g;if("undefined"!=typeof window&&window)return window;if("undefined"!=typeof globalThis&&globalThis)return globalThis;var t=Function("return this")();if(t)return t;throw Error("Could not determine global object context.")}();var y={sessionError:"reportError"},b=Object.keys(a.MediaEventType).map((function(e){return a.MediaEventType[e]})),S=["impressionOccurred"],E=function(e){e=void 0===e?m.omidGlobal:e,this.interfaceRoot_=e.omidSessionInterface};E.prototype.isSupported=function(){return null!=this.interfaceRoot_},E.prototype.sendMessage=function(e,t,n){if("registerSessionObserver"==e&&(n=[t]),y[e]&&(e=y[e]),t=this.interfaceRoot_,0<=S.indexOf(e)&&(t=t.adEvents),0<=b.indexOf(e)&&(t=t.mediaEvents),!(t=t[e]))throw Error("Unrecognized method name: "+e+".");t.apply(null,o.arrayFromIterable(n))};var $={};function T(e){for(var t=[],n=0;ni)break;if(r